Avoid notice when reporting DB errors for objects that don't have an 'id' field

This commit is contained in:
Brion Vibber 2010-03-24 14:18:25 -07:00
parent 64b5ea2e62
commit abf2ce873b
1 changed files with 1 additions and 1 deletions

View 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");