From 485dc3a0d62a9ca097b9a5240173e73316419d55 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 6 Jun 2011 09:41:33 +0000 Subject: [PATCH] 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 --- includes/json/Services_JSON.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } } } -- 2.20.1