addConditionsToQuery adds "=" by default
This commit is contained in:
@ -21,10 +21,9 @@ class Utils {
|
||||
|
||||
public function addConditionsToQuery(QueryInterface $query, array $conditions): void {
|
||||
foreach($conditions as $condition) {
|
||||
if (sizeof($condition) != 3) throw new RuntimeException('Utils::addConditionsToQuery needs each condition to consist of 3 strings');
|
||||
$field = $condition[0];
|
||||
$value = $condition[1];
|
||||
$operator = $condition[2];
|
||||
$operator = isset($condition[2]) ? $condition[2] : "=";
|
||||
$query->condition($field, $value, $operator);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user