From a8624b2b7278c88ff5d6daa4c8c657778235b3cc Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 27 Sep 2008 08:35:07 -0400 Subject: [PATCH] slightly better check on $orig in update() darcs-hash:20080927123507-5ed1f-57bc3843352007ae47689a94483d315984276b45.gz --- 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 84529ce9a6..ef8631d5d5 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -53,7 +53,7 @@ class Memcached_DataObject extends DB_DataObject } function update($orig=NULL) { - if (!is_null($orig)) { + if (is_object($orig) && $orig instanceof Memcached_DataObject) { $orig->decache(); # might be different keys } $result = parent::update($orig); -- 2.39.5