Commit 6b3adba9 authored by Cédric Anne's avatar Cédric Anne
Browse files

Check for criteria conflicts (inside and outside "WHERE" key); see #8670

parent e9f0a13d
......@@ -285,6 +285,12 @@ class DBmysqlIterator implements Iterator, Countable {
// WHERE criteria list
if (!empty($crit)) {
$this->sql .= " WHERE ".$this->analyseCrit($crit);
if ($where) {
trigger_error(
'Criteria found both inside and outside "WHERE" key. Some of them will be ignored',
E_USER_WARNING
);
}
} else if ($where) {
$this->sql .= " WHERE ".$this->analyseCrit($where);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment