summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-09-26 12:35:55 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-09-26 12:35:55 -0400
commitf01f006615c2ad47f1cf0277220d807e119acf3f (patch)
tree68e53e5c90a54e5beab7466140ab2a85c8aa154a /classes
parentd3f8cd39a172b6dd9bd373f5e1eda5a9886e4641 (diff)
hack to make keys work
darcs-hash:20080926163555-5ed1f-b2c7f8b9fde0af801e33dc92e4177d1ed4f80159.gz
Diffstat (limited to 'classes')
-rw-r--r--classes/Memcached_DataObject.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index ff1ca0bdf..15849e3c5 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)) {