]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
show PEAR_Error message, not the object
authorEvan Prodromou <evan@status.net>
Wed, 7 Apr 2010 14:43:14 +0000 (10:43 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 7 Apr 2010 14:43:14 +0000 (10:43 -0400)
classes/Memcached_DataObject.php

index bc4c3a000ce11a732bc495e878fc018854dcd79d..920966b16dbb5e9862ce86d10505288f90670f75 100644 (file)
@@ -505,6 +505,9 @@ class Memcached_DataObject extends Safe_DataObject
         if ($this->id) {
             $id .= ':' . $this->id;
         }
+        if ($message instanceof PEAR_Error) {
+            $message = $message->getMessage();
+        }
         throw new ServerException("[$id] DB_DataObject error [$type]: $message");
     }