Regression fix: don't spew notices to log every time we get a non-cached user object

This commit is contained in:
Brion Vibber 2010-01-11 13:24:52 -08:00
parent be1ac6678d
commit f397d35527

View File

@ -174,7 +174,7 @@ class Memcached_DataObject extends DB_DataObject
$obj = $c->get(Memcached_DataObject::cacheKey($cls, $k, $v)); $obj = $c->get(Memcached_DataObject::cacheKey($cls, $k, $v));
if (0 == strcasecmp($cls, 'User')) { if (0 == strcasecmp($cls, 'User')) {
// Special case for User // Special case for User
if (is_object($obj->id)) { if (is_object($obj) && is_object($obj->id)) {
common_log(LOG_ERR, "User " . $obj->nickname . " was cached with User as ID; deleting"); common_log(LOG_ERR, "User " . $obj->nickname . " was cached with User as ID; deleting");
$c->delete(Memcached_DataObject::cacheKey($cls, $k, $v)); $c->delete(Memcached_DataObject::cacheKey($cls, $k, $v));
return false; return false;