Fix logical issue in null value checks for db_object_t where clause construction
- Corrected conditional logic to handle 'is null' string case.
This commit is contained in:
@@ -487,7 +487,7 @@ trait db_object_t
|
||||
continue;
|
||||
}
|
||||
// If the value is null, add a where clause to check if the field is null
|
||||
if ($value === null || (is_string($value) && strtolower($value) === 'null') || (is_string($value) && strtolower($value === 'is_null'))) {
|
||||
if ($value === null || (is_string($value) && strtolower($value) === 'null') || (is_string($value) && strtolower($value === 'is_null')) || is_string($value) && strtolower($value === 'is null')) {
|
||||
$whereClauses[] = "$field IS NULL";
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user