Skip to content

Commit

Permalink
[BUGFIX] Supply correct parameter to json_decode (#928) (#929)
Browse files Browse the repository at this point in the history
This line has been changed several times, but was probably never
correct: Either set the second parameter of json_decode() to true
to get an associative array or set the flag JSON_OBJECT_AS_ARRAY
as fourth parameter.

We opt for the second parameter to keep things simple
  • Loading branch information
s2b authored Jul 21, 2024
1 parent c419f79 commit a3799ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/Variables/JSONVariableProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function load()
} else {
$source = $this->source;
}
$this->variables = json_decode($source, defined('JSON_OBJECT_AS_ARRAY') ? JSON_OBJECT_AS_ARRAY : 1);
$this->variables = json_decode($source, true);
$this->lastLoaded = time();
}
}
Expand Down

0 comments on commit a3799ae

Please sign in to comment.