From: Evan Prodromou Date: Fri, 26 Sep 2008 16:35:55 +0000 (-0400) Subject: hack to make keys work X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f01f006615c2ad47f1cf0277220d807e119acf3f;p=quix0rs-gnu-social.git hack to make keys work darcs-hash:20080926163555-5ed1f-b2c7f8b9fde0af801e33dc92e4177d1ed4f80159.gz --- diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index ff1ca0bdfe..15849e3c5a 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -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)) {