Skip to content

Commit fd952dd

Browse files
authored
Merge pull request #29 from ibrahemhamdy1/fix-toFlat-error
Fix the get_object_vars().
2 parents 034f569 + 4b36fb9 commit fd952dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Classes/ExportLocalizations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function toFlat($prefix = '.')
200200
$default_key = $default_locale.$prefix.'__JSON__';
201201
if (! array_key_exists($default_key, $results)) {
202202
$buffer = array_keys(
203-
get_object_vars($default_json_strings)
203+
$default_json_strings ? get_object_vars($default_json_strings) : []
204204
);
205205

206206
$results[$default_key] = array_combine($buffer, $buffer);

0 commit comments

Comments
 (0)