forked from GNUsocial/gnu-social
Memcached_DataObject::pkeyGet() accepts null values
This commit is contained in:
parent
641749453d
commit
5c963cb3b7
@ -78,7 +78,13 @@ class Memcached_DataObject extends Safe_DataObject
|
||||
return false;
|
||||
}
|
||||
foreach ($kv as $k => $v) {
|
||||
$i->$k = $v;
|
||||
if (is_null($v)) {
|
||||
// XXX: possible SQL injection...? Don't
|
||||
// pass keys from the browser, eh.
|
||||
$i->whereAdd("$k is null");
|
||||
} else {
|
||||
$i->$k = $v;
|
||||
}
|
||||
}
|
||||
if ($i->find(true)) {
|
||||
$i->encache();
|
||||
|
Loading…
Reference in New Issue
Block a user