- Fixed IN() query from Where rendering
This commit is contained in:
1 parent
b6752f4364
commit
43a913a602
2 files changed
+6
-6
No files matched your search
+2
-2
@@ -110,11 +110,11 @@ class Where extends Fragment {
|
||||
protected function operator() : string
|
||||
{
|
||||
if ( is_array($this->value) ) {
|
||||
return (in_array($this->operator, [ '!=', '<>' ]) ? Where::CONDITION_NOT . " " : "") . Where::COMPARISON_IN;
|
||||
return Where::COMPARISON_IN;
|
||||
}
|
||||
|
||||
# whitelisting operators
|
||||
return in_array(strtoupper($this->operator), [ '=', '!=', '>', '>=', '<', '<=', '<>', 'LIKE', 'IS', 'IS NOT', 'REGEXP' ]) ? $this->operator : "=";
|
||||
return in_array(strtoupper($this->operator), [ '=', '!=', '>', '>=', '<', '<=', '<>', 'LIKE', 'IS', 'IS NOT', 'REGEXP', 'IN' ]) ? $this->operator : "=";
|
||||
}
|
||||
|
||||
protected function value()
|
||||
|
||||
Reference in new issue
Block a user