Fix the non-PEAR alternative for Services_JSON_Error to be less useless. bug 29278...
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 6 Jun 2011 09:41:33 +0000 (09:41 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 6 Jun 2011 09:41:33 +0000 (09:41 +0000)
includes/json/Services_JSON.php

index 5261a6a..29cc361 100644 (file)
@@ -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;
                }
        }
 }