Skip to content

Commit 95d5437

Browse files
committed
refactor(database): defer whereColumn caller lookup
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent 65788ae commit 95d5437

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/Database/BaseBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,11 +784,12 @@ public function orWhereColumn(string $first, string $second, ?bool $escape = nul
784784
*/
785785
protected function whereColumnHaving(string $qbKey, string $first, string $second, string $type = 'AND ', ?bool $escape = null)
786786
{
787-
$caller = debug_backtrace(0, 2)[1]['function'];
788787
[$first, $operator] = $this->parseWhereColumnFirst($first);
789788
$second = trim($second);
790789

791790
if ($first === '' || $second === '') {
791+
$caller = debug_backtrace(0, 2)[1]['function'];
792+
792793
throw new InvalidArgumentException(sprintf('%s() expects $first and $second to be non-empty strings', $caller));
793794
}
794795

0 commit comments

Comments
 (0)