hack to make keys work

darcs-hash:20080926163555-5ed1f-b2c7f8b9fde0af801e33dc92e4177d1ed4f80159.gz
This commit is contained in:
Evan Prodromou 2008-09-26 12:35:55 -04:00
parent d3f8cd39a1
commit f01f006615

View 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)) {