Skip to content

Commit 1d70bd0

Browse files
author
Andrey Helldar
authored
CashierProvider\Core\Helpers\JSON::decode(): Return value must be of type array, string returned
1 parent e99001f commit 1d70bd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Helpers/JSON.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function decode(?string $encoded): array
4343

4444
$decoded = json_decode($encoded, true) ?: [];
4545

46-
return $this->doesntError() ? $decoded : $this->parseErrors($encoded);
46+
return $this->doesntError() ? (array) $decoded : $this->parseErrors($encoded);
4747
}
4848

4949
protected function doesntError(): bool

0 commit comments

Comments
 (0)