Skip to content

Commit 806277a

Browse files
committed
Address issue pointed out by scrutinizer
1 parent 5f86483 commit 806277a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AbstractJsonEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ private function getJsonErrorName($error)
417417
$name = 'UNKNOWN_ERROR';
418418

419419
foreach ($matches as $match) {
420-
if (strncmp($match, $prefix, $prefixLength) === 0) {
420+
if (is_string($match) && strncmp($match, $prefix, $prefixLength) === 0) {
421421
$name = $match;
422422
break;
423423
}

0 commit comments

Comments
 (0)