mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-21 06:47:20 -04:00
Merge pull request #1093 from Alkarex/json_decode
json_decode fallback debug
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user