diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index 5ea08811e110..83b74035f848 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -659,7 +659,7 @@ protected function whereHaving(string $qbKey, $key, $value = null, string $type $op = trim(current($op)); if (substr($k, -1 * strlen($op)) === $op) { - $k = rtrim(substr($k, 0, -1 * strlen($op))); + $k = rtrim(substr($k, 0, -strlen($op))); $op = " {$op}"; } else { $op = ''; @@ -680,7 +680,7 @@ protected function whereHaving(string $qbKey, $key, $value = null, string $type $op = ' IS NULL'; } elseif (preg_match('/\s*(!?=|<>|IS(?:\s+NOT)?)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) { $k = substr($k, 0, $match[0][1]); - $op = ($match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL'); + $op = $match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL'; } else { $op = ''; }