diff options
| author | 2016-02-24 21:16:21 +0100 | |
|---|---|---|
| committer | 2016-02-24 21:16:21 +0100 | |
| commit | 9adbd2ba9bfe885a4ccf4ec6ad99929e89cf6fb6 (patch) | |
| tree | c327f84268d6fc9b569337bc4575a710ed96c6d6 /lib | |
| parent | 67dfeeb3972b9c89f37bbeb6e218cdf486bd5026 (diff) | |
json_decode fallback debug
https://github.com/FreshRSS/FreshRSS/issues/1092
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lib_rss.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 7d92b6fd7..e74b26e3f 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -1,16 +1,16 @@ <?php if (!function_exists('json_decode')) { require_once('JSON.php'); - function json_decode($var) { - $JSON = new Services_JSON; - return (array)($JSON->decode($var)); + function json_decode($var, $assoc) { + $JSON = new Services_JSON($assoc ? SERVICES_JSON_LOOSE_TYPE : 0); + return $JSON->decode($var, $assoc); } } if (!function_exists('json_encode')) { require_once('JSON.php'); function json_encode($var) { - $JSON = new Services_JSON; + $JSON = new Services_JSON(); return $JSON->encodeUnsafe($var); } } |
