]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Avoid notice when reporting DB errors for objects that don't have an 'id' field
authorBrion Vibber <brion@pobox.com>
Wed, 24 Mar 2010 21:18:25 +0000 (14:18 -0700)
committerBrion Vibber <brion@pobox.com>
Wed, 24 Mar 2010 21:18:25 +0000 (14:18 -0700)
classes/Memcached_DataObject.php

index bc4c3a000ce11a732bc495e878fc018854dcd79d..af148ef693903f2b89877885938fb75bda7d0263 100644 (file)
@@ -502,7 +502,7 @@ class Memcached_DataObject extends Safe_DataObject
     function raiseError($message, $type = null, $behaviour = null)
     {
         $id = get_class($this);
-        if ($this->id) {
+        if (!empty($this->id)) {
             $id .= ':' . $this->id;
         }
         throw new ServerException("[$id] DB_DataObject error [$type]: $message");