From f397d355276c57941617049808ff59a5f2538beb Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 11 Jan 2010 13:24:52 -0800 Subject: [PATCH] Regression fix: don't spew notices to log every time we get a non-cached user object --- classes/Memcached_DataObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 21f6781c2d..b68a4af8eb 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -174,7 +174,7 @@ class Memcached_DataObject extends DB_DataObject $obj = $c->get(Memcached_DataObject::cacheKey($cls, $k, $v)); if (0 == strcasecmp($cls, '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"); $c->delete(Memcached_DataObject::cacheKey($cls, $k, $v)); return false; -- 2.39.5