diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-25 17:53:44 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-25 17:53:44 +0200 |
commit | 0efeef6b6693d62675ec8a45e73c71f69e0a0362 (patch) | |
tree | 4b86b3bd62217fc4c60e2827e30a45209ce82605 /app/class/Flywheel/Formatter/JSON.php | |
parent | bd16dc7c6fc630a6b59ca3b041dde146ab50c72b (diff) | |
parent | 385b3f4adf86606e03941171c136d8f2eb2b35c2 (diff) | |
download | wcms-0efeef6b6693d62675ec8a45e73c71f69e0a0362.tar.gz wcms-0efeef6b6693d62675ec8a45e73c71f69e0a0362.zip |
Merge branch master with implement-exception
Diffstat (limited to 'app/class/Flywheel/Formatter/JSON.php')
-rw-r--r-- | app/class/Flywheel/Formatter/JSON.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/class/Flywheel/Formatter/JSON.php b/app/class/Flywheel/Formatter/JSON.php index d55c3b6..108c756 100644 --- a/app/class/Flywheel/Formatter/JSON.php +++ b/app/class/Flywheel/Formatter/JSON.php @@ -10,13 +10,11 @@ class JSON implements \JamesMoss\Flywheel\Formatter\FormatInterface } public function encode(array $data) { - $options = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : null; - $options .= JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE; + $options = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE : null; return json_encode($data, $options); } public function decode($data) { - $options = defined('JSON_OBJECT_AS_ARRAY') ? JSON_OBJECT_AS_ARRAY : null; - return json_decode($data, $options); + return json_decode($data, true); } } |