- Some work done on correcting LDAP package compatibility
This commit is contained in:
1 parent
71de0a8ac1
commit
e3d0e45a4e
13 files changed
+110
-22
No files matched your search
@@ -29,6 +29,9 @@ class Having extends Fragment {
|
||||
|
||||
public function add($field, $value, string $operator, string $condition, bool $not = false) : self
|
||||
{
|
||||
$this->validateFieldType($field);
|
||||
# $this->validateValueType($value);
|
||||
|
||||
$this->conditionList[] = [
|
||||
$field,
|
||||
$value,
|
||||
@@ -102,7 +105,8 @@ class Having extends Fragment {
|
||||
return (in_array($this->operator, [ '!=', '<>' ]) ? Where::CONDITION_NOT . " " : "") . Where::COMPARISON_IN;
|
||||
}
|
||||
|
||||
return $this->operator;
|
||||
# whitelisting operators
|
||||
return in_array(strtoupper($this->operator), [ '=', '!=', '<>', 'LIKE' ]) ? $this->operator : "=";
|
||||
}
|
||||
|
||||
protected function value()
|
||||
@@ -124,6 +128,7 @@ class Having extends Fragment {
|
||||
{
|
||||
if ( $value === null ) {
|
||||
$this->operator = in_array($this->operator, [ '!=', '<>' ]) ? Where::COMPARISON_IS . " " . Where::CONDITION_NOT : Where::COMPARISON_IS;
|
||||
|
||||
return Where::COMPARISON_NULL;
|
||||
}
|
||||
elseif ( is_object($value) && ( $value instanceof EntityField ) ) {
|
||||
|
||||
Reference in new issue
Block a user