Skip to content

Commit eded6b8

Browse files
committed
The Decoded can be string; Uncaught TypeError: Cannot access offset of type string on string in /usr/share/php/AbraFlexi/RO.php:1301 fix
1 parent d53f189 commit eded6b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AbraFlexi/RO.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,9 @@ public function parseResponse($responseDecoded, $responseCode)
12981298

12991299
// no break
13001300
case 401:
1301-
if (\array_key_exists('message', $responseDecoded)) {
1301+
if (is_string($responseDecoded)){
1302+
$msg = $responseDecoded;
1303+
} elseif (\array_key_exists('message', $responseDecoded)) {
13021304
$msg = $responseDecoded['message'];
13031305
} elseif (isset($responseDecoded[key($responseDecoded)]['message'])) {
13041306
$msg = $responseDecoded[key($responseDecoded)]['message'];

0 commit comments

Comments
 (0)