From d3f8cd39a172b6dd9bd373f5e1eda5a9886e4641 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 26 Sep 2008 12:33:57 -0400 Subject: [PATCH] handle one-argument calls to staticGet darcs-hash:20080926163357-5ed1f-49bd6d85d34d0e6ac3514c06d99e5b5b9a78b0fc.gz --- classes/Memcached_DataObject.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index ab56d2474e..ff1ca0bdfe 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -24,6 +24,11 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; class Memcached_DataObject extends DB_DataObject { function &staticGet($cls, $k, $v=NULL) { + if (is_null($v)) { + $v = $k; + $keys = $cls->keys(); + $k = $keys[0]; + } $i = Memcached_DataObject::getcached($cls, $k, $v); if (!is_null($i)) { return $i; -- 2.39.5