From f01f006615c2ad47f1cf0277220d807e119acf3f Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 26 Sep 2008 12:35:55 -0400 Subject: [PATCH] hack to make keys work darcs-hash:20080926163555-5ed1f-b2c7f8b9fde0af801e33dc92e4177d1ed4f80159.gz --- classes/Memcached_DataObject.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) { -- 2.39.5