slightly better check on $orig in update()

darcs-hash:20080927123507-5ed1f-57bc3843352007ae47689a94483d315984276b45.gz
This commit is contained in:
Evan Prodromou 2008-09-27 08:35:07 -04:00
parent 82084ab74c
commit a8624b2b72

View File

@ -53,7 +53,7 @@ class Memcached_DataObject extends DB_DataObject
} }
function update($orig=NULL) { function update($orig=NULL) {
if (!is_null($orig)) { if (is_object($orig) && $orig instanceof Memcached_DataObject) {
$orig->decache(); # might be different keys $orig->decache(); # might be different keys
} }
$result = parent::update($orig); $result = parent::update($orig);