From: Roan Kattouw Date: Mon, 6 Jun 2011 09:41:33 +0000 (+0000) Subject: Fix the non-PEAR alternative for Services_JSON_Error to be less useless. bug 29278... X-Git-Tag: 1.31.0-rc.0~29674 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22brouteur%22%2C%28%24id_rubrique%20?a=commitdiff_plain;h=485dc3a0d62a9ca097b9a5240173e73316419d55;p=lhc%2Fweb%2Fwiklou.git Fix the non-PEAR alternative for Services_JSON_Error to be less useless. bug 29278 shows an error related to this class not being stringifiable --- diff --git a/includes/json/Services_JSON.php b/includes/json/Services_JSON.php index 5261a6ae48..29cc36179c 100644 --- a/includes/json/Services_JSON.php +++ b/includes/json/Services_JSON.php @@ -870,7 +870,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; } } }