forked from GNUsocial/gnu-social
[DB] Fix bug in custom criteria format wrangling
This commit is contained in:
parent
ec8ad1888a
commit
f6dea6e162
@ -113,7 +113,12 @@ abstract class DB
|
||||
foreach ($criteria as $op => $exp) {
|
||||
if ($op == 'or' || $op == 'and') {
|
||||
$method = "{$op}X";
|
||||
return $eb->{$method}(...self::buildExpression($eb, $exp));
|
||||
$expr = self::buildExpression($eb, $exp);
|
||||
if (is_array($expr)) {
|
||||
return $eb->{$method}(...$expr);
|
||||
} else {
|
||||
return $eb->{$method}($expr);
|
||||
}
|
||||
} elseif ($op == 'is_null') {
|
||||
$expressions[] = $eb->isNull($exp);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user