diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2008-09-26 12:40:21 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2008-09-26 12:40:21 -0400 |
commit | 98add9803b7ef29ca8e181ed246b2be522679daa (patch) | |
tree | fbaa94409990902df921c7cf99b6e19089deb67b | |
parent | f01f006615c2ad47f1cf0277220d807e119acf3f (diff) |
don't record null key values
darcs-hash:20080926164021-5ed1f-833db670e260c68fc02b0a2a60a2829f247742a1.gz
-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 |