From: Brion Vibber Date: Wed, 24 Mar 2010 21:18:25 +0000 (-0700) Subject: Avoid notice when reporting DB errors for objects that don't have an 'id' field X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=abf2ce873b23f238041c4b4190dc709b2d40774d;p=quix0rs-gnu-social.git Avoid notice when reporting DB errors for objects that don't have an 'id' field --- diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index bc4c3a000c..af148ef693 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -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");