X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjson%2FServices_JSON.php;h=2566072dba4c82d3c2ad56ba1e354d526b00e863;hb=493fc3dfe34e9de701bfd4ab27ce8ebbddcbf71f;hp=5261a6ae48794d04045e0b7ac385512c738d69d2;hpb=4207ab0c63609cdc3291b9c16c9fa01178dda374;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/json/Services_JSON.php b/includes/json/Services_JSON.php index 5261a6ae48..2566072dba 100644 --- a/includes/json/Services_JSON.php +++ b/includes/json/Services_JSON.php @@ -136,7 +136,7 @@ class Services_JSON { $this->use = $use; } - + private static $mHavePear = null; /** * Returns cached result of class_exists('pear'), to avoid calling AutoLoader numerous times @@ -283,7 +283,7 @@ class Services_JSON return $this->encode2($var); } - /** + /** * encodes an arbitrary variable into JSON format * * @param $var Mixed: any number, boolean, string, array, or object to be encoded. @@ -826,6 +826,7 @@ class Services_JSON /** * @todo Ultimately, this should just call PEAR::isError() + * @return bool */ function isError($data, $code = null) { @@ -870,7 +871,12 @@ if (class_exists('PEAR_Error')) { function Services_JSON_Error($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null) { + $this->message = $message; + } + function __toString() + { + return $this->message; } } }