]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't record null key values
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 26 Sep 2008 16:40:21 +0000 (12:40 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 26 Sep 2008 16:40:21 +0000 (12:40 -0400)
darcs-hash:20080926164021-5ed1f-833db670e260c68fc02b0a2a60a2829f247742a1.gz

classes/Memcached_DataObject.php

index 15849e3c5a445d0ed73fc845322cf5cf4b23b8bd..35660eaed558dddafb91349fa31901b4242492cb 100644 (file)
@@ -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