Skip to content

Commit c184592

Browse files
committed
Change the way the dirtyHookCallback is called
It shouldn't be bound to the Query instance. Looks a bit stupid, but when stored in a class property you can't call it like: $this->closure(); because that's the syntax for calling class methods.
1 parent 32870ec commit c184592

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Query.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,11 @@ private function setDirty(): void
729729

730730
$this->parent?->setDirty();
731731

732-
$this->dirtyHookCallback?->call($this);
732+
if ($this->dirtyHookCallback) {
733+
$dirtyHookCallback = $this->dirtyHookCallback;
734+
735+
$dirtyHookCallback();
736+
}
733737
}
734738

735739
/**

0 commit comments

Comments
 (0)