aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-02-25 19:27:05 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-02-25 19:27:05 +0100
commitb46c8607ee350c334e2c2232a6f050ffd63a8a67 (patch)
tree7892a29bfc5256d9be3c868fd9af76da3b229671 /lib
parentbc6a1eab880f43e36ffae6e93135ff5e9c8cf2c7 (diff)
parentbd47d14a536fee657a3ba2f7cfba9921567356b2 (diff)
Merge pull request #1093 from Alkarex/json_decode
json_decode fallback debug
Diffstat (limited to 'lib')
-rw-r--r--lib/lib_rss.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 7d92b6fd7..a09960de0 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 = false) {
+ $JSON = new Services_JSON($assoc ? SERVICES_JSON_LOOSE_TYPE : 0);
+ return $JSON->decode($var);
}
}
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);
}
}