]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
hack to make keys work
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 26 Sep 2008 16:35:55 +0000 (12:35 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 26 Sep 2008 16:35:55 +0000 (12:35 -0400)
darcs-hash:20080926163555-5ed1f-b2c7f8b9fde0af801e33dc92e4177d1ed4f80159.gz

classes/Memcached_DataObject.php

index ff1ca0bdfeb76be18f0cbd1c957cdc854d440bce..15849e3c5a445d0ed73fc845322cf5cf4b23b8bd 100644 (file)
@@ -26,8 +26,11 @@ class Memcached_DataObject extends DB_DataObject
     function &staticGet($cls, $k, $v=NULL) {
                if (is_null($v)) {
                        $v = $k;
-                       $keys = $cls->keys();
+                       # XXX: HACK!
+                       $i = new $cls;
+                       $keys = $i->keys();
                        $k = $keys[0];
+                       unset($i);
                }
                $i = Memcached_DataObject::getcached($cls, $k, $v);
                if (!is_null($i)) {