diff options
-rw-r--r-- | classes/Memcached_DataObject.php | 5 |
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)) { |