diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/JSON.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/JSON.php b/inc/JSON.php index b31340f44..012697eb3 100644 --- a/inc/JSON.php +++ b/inc/JSON.php @@ -136,7 +136,9 @@ class JSON { * @access public */ function encode($var) { - if (function_exists('json_encode')) return json_encode($var); + if (!$this->skipnative && function_exists('json_encode')){ + return json_encode($var); + } switch (gettype($var)) { case 'boolean': return $var ? 'true' : 'false'; |