aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-02-24 21:28:11 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-02-24 21:28:11 +0100
commit033f9695b4c9f30c8a8630686950635ce589f8b3 (patch)
treedc1e8bd72d6cb1b1195912426fc609a5493784bd /lib/lib_rss.php
parente546a0ab049e13b28c3bf0fbf6d4ff2439b2541e (diff)
parentbd47d14a536fee657a3ba2f7cfba9921567356b2 (diff)
Merge branch 'json_decode' into dev
Diffstat (limited to 'lib/lib_rss.php')
-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);
}
}