Skip to content

Commit

Permalink
Change the way the dirtyHookCallback is called
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
otsch committed Jun 1, 2022
1 parent 32870ec commit c184592
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,11 @@ private function setDirty(): void

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

$this->dirtyHookCallback?->call($this);
if ($this->dirtyHookCallback) {
$dirtyHookCallback = $this->dirtyHookCallback;

$dirtyHookCallback();
}
}

/**
Expand Down

0 comments on commit c184592

Please sign in to comment.