diff options
-rw-r--r-- | classes/Memcached_DataObject.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 15849e3c5..35660eaed 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -112,8 +112,11 @@ class Memcached_DataObject extends DB_DataObject if ($type == 'K') { $primary[] = $key; } else { - $c->set($this->cacheKey($this->tableName(), $key, $this->$key), - $this); + $v = $this->$key; + if (!is_null($v)) { + $c->set($this->cacheKey($this->tableName(), $key, $v), + $this); + } } } # XXX: figure out what to do with compound pkeys |