From: Evan Prodromou Date: Fri, 26 Sep 2008 16:33:57 +0000 (-0400) Subject: handle one-argument calls to staticGet X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d3f8cd39a172b6dd9bd373f5e1eda5a9886e4641;p=quix0rs-gnu-social.git handle one-argument calls to staticGet darcs-hash:20080926163357-5ed1f-49bd6d85d34d0e6ac3514c06d99e5b5b9a78b0fc.gz --- 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;