Skip to content

Commit c15885c

Browse files
author
Anton Samofal
committed
Replace Utils::jsonDecode with native json_decode() to support guzzle 6.5
1 parent fa1c108 commit c15885c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Exceptions/KlarnaException.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Gets\Klarna\Exceptions;
44

55
use GuzzleHttp\Exception\GuzzleException;
6-
use GuzzleHttp\Utils;
76

87
class KlarnaException extends \Exception
98
{
@@ -12,7 +11,7 @@ public static function fromResponse($responseContent, GuzzleException $previousE
1211
if ($previousException->getCode() === 401) {
1312
return new KlarnaInvalidConfig("Invalid klarna credentials", 0, $previousException);
1413
}
15-
$responseParsed = Utils::jsonDecode($responseContent);
14+
$responseParsed = json_decode($responseContent);
1615
if (is_array($responseParsed) && !empty($responseParsed[0])) {
1716
$error = $responseParsed[0];
1817
switch ($error->errorCode) {
@@ -41,5 +40,4 @@ public static function fromResponse($responseContent, GuzzleException $previousE
4140

4241
return new self($responseContent, 0, $previousException);
4342
}
44-
45-
}
43+
}

0 commit comments

Comments
 (0)