Skip to content

Commit 095ee0c

Browse files
author
Vítězslav Dvořák
committed
do not fall when there is eg. no company defined yet
1 parent fe2a9bf commit 095ee0c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AbraFlexi/RO.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,11 @@ public function rawJsonToArray($rawJson)
12061206

12071207
if ($decodeError === 'No error') {
12081208
if (\array_key_exists($this->nameSpace, $responseDecoded)) {
1209-
$responseDecoded = $this->nativeTypes ? $this->fixResponseTypes($responseDecoded[$this->nameSpace]) : $responseDecoded[$this->nameSpace];
1209+
if (is_array($responseDecoded[$this->nameSpace])) {
1210+
$responseDecoded = $this->nativeTypes ? $this->fixResponseTypes($responseDecoded[$this->nameSpace]) : $responseDecoded[$this->nameSpace];
1211+
} else {
1212+
$responseDecoded = $responseDecoded[$this->nameSpace];
1213+
}
12101214
}
12111215
} else {
12121216
if ($this->throwException === true) {

0 commit comments

Comments
 (0)