forked from GNUsocial/gnu-social
Avoid spewing warnings about returning by reference on memcached cache misses by setting a var and returning it instead of trying to return false directly.
This hacky workaround is brought to you by DB_DataObject's PHP 4 roots.
This commit is contained in:
parent
9c34d5c107
commit
4cc9b183d7
@ -98,14 +98,16 @@ class Memcached_DataObject extends DB_DataObject
|
||||
} else {
|
||||
$i = DB_DataObject::factory($cls);
|
||||
if (empty($i)) {
|
||||
return false;
|
||||
$i = false;
|
||||
return $i;
|
||||
}
|
||||
$result = $i->get($k, $v);
|
||||
if ($result) {
|
||||
$i->encache();
|
||||
return $i;
|
||||
} else {
|
||||
return false;
|
||||
$i = false;
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user