summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Memcached_DataObject.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 644b84d5c..bf61b0766 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -37,11 +37,17 @@ class Memcached_DataObject extends DB_DataObject
if ($i) {
return $i;
} else {
- $i = DB_DataObject::staticGet($cls, $k, $v);
- if ($i) {
+ $i = DB_DataObject::factory($cls);
+ if (empty($i)) {
+ return null;
+ }
+ $result = $i->get($k, $v);
+ if ($result) {
$i->encache();
+ return $i;
+ } else {
+ return null;
}
- return $i;
}
}