summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-02 19:47:34 -1000
committerEvan Prodromou <evan@status.net>2010-01-02 19:47:34 -1000
commit90a2563a90e1bf2239d177a564bbe3e838d93dc4 (patch)
tree47a19a1a564dc0934f0e04d46af3b6f0db30cc1d /classes
parent2851296c8df7ad8fb9394d9d087ce04867e30d92 (diff)
parentd32fb7c7c40e3d5fa67496d5df0574fc9c2e0151 (diff)
Merge branch 'master' into 0.9.x
Conflicts: classes/Memcached_DataObject.php
Diffstat (limited to 'classes')
-rw-r--r--classes/Memcached_DataObject.php20
-rw-r--r--classes/Notice.php2
2 files changed, 5 insertions, 17 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 4f81bef75..1608720d1 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -23,7 +23,7 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
class Memcached_DataObject extends DB_DataObject
{
- /**
+ /**
* Destructor to free global memory resources associated with
* this data object when it's unset or goes out of scope.
* DB_DataObject doesn't do this yet by itself.
@@ -62,14 +62,14 @@ class Memcached_DataObject extends DB_DataObject
} else {
$i = DB_DataObject::factory($cls);
if (empty($i)) {
- return null;
+ return false;
}
$result = $i->get($k, $v);
if ($result) {
$i->encache();
return $i;
} else {
- return null;
+ return false;
}
}
}
@@ -122,7 +122,7 @@ class Memcached_DataObject extends DB_DataObject
}
static function cacheKey($cls, $k, $v) {
- if (is_object($cls) || is_object($j) || is_object($v)) {
+ if (is_object($cls) || is_object($k) || is_object($v)) {
$e = new Exception();
common_log(LOG_ERR, __METHOD__ . ' object in param: ' .
str_replace("\n", " ", $e->getTraceAsString()));
@@ -262,18 +262,6 @@ class Memcached_DataObject extends DB_DataObject
return new ArrayWrapper($cached);
}
- function cleanup()
- {
- global $_DB_DATAOBJECT;
-
- if (isset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid])) {
- unset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid]);
- }
- if (isset($_DB_DATAOBJECT['RESULTS'][$this->_DB_resultid])) {
- unset($_DB_DATAOBJECT['RESULTS'][$this->_DB_resultid]);
- }
- }
-
// We overload so that 'SET NAMES "utf8"' is called for
// each connection
diff --git a/classes/Notice.php b/classes/Notice.php
index fe3f3c017..3e55bd6fa 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -214,7 +214,7 @@ class Notice extends Memcached_DataObject
extract($options);
}
- if (empty($is_local)) {
+ if (!isset($is_local)) {
$is_local = Notice::LOCAL_PUBLIC;
}