We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d421524 commit 4a971e4Copy full SHA for 4a971e4
src/Json/Json.php
@@ -61,11 +61,11 @@ public static function fileToArray($file) {
61
62
$jsonString = @file_get_contents($file);
63
64
- $jsonArray = json_decode($jsonString, true);
+ $array = json_decode($jsonString, true);
65
66
$error = self::_jsonLastError();
67
68
- return isset($error['error-code']) ? false : $jsonArray;
+ return (!$array || isset($error['error-code'])) ? false : $array;
69
}
70
71
/**
0 commit comments