From: Evan Prodromou Date: Fri, 26 Sep 2008 16:40:21 +0000 (-0400) Subject: don't record null key values X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=98add9803b7ef29ca8e181ed246b2be522679daa;p=quix0rs-gnu-social.git don't record null key values darcs-hash:20080926164021-5ed1f-833db670e260c68fc02b0a2a60a2829f247742a1.gz --- 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