Skip to content

Commit 4a971e4

Browse files
committed
Updated to 1.1.4 version
1 parent d421524 commit 4a971e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Json/Json.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ public static function fileToArray($file) {
6161

6262
$jsonString = @file_get_contents($file);
6363

64-
$jsonArray = json_decode($jsonString, true);
64+
$array = json_decode($jsonString, true);
6565

6666
$error = self::_jsonLastError();
6767

68-
return isset($error['error-code']) ? false : $jsonArray;
68+
return (!$array || isset($error['error-code'])) ? false : $array;
6969
}
7070

7171
/**

0 commit comments

Comments
 (0)