From 98add9803b7ef29ca8e181ed246b2be522679daa Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 26 Sep 2008 12:40:21 -0400 Subject: [PATCH] don't record null key values darcs-hash:20080926164021-5ed1f-833db670e260c68fc02b0a2a60a2829f247742a1.gz --- classes/Memcached_DataObject.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 15849e3c5a..35660eaed5 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 -- 2.39.5