From c1845929a05a7a677690a79f2642335b580cde11 Mon Sep 17 00:00:00 2001 From: otsch Date: Wed, 1 Jun 2022 19:43:54 +0200 Subject: [PATCH] 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. --- src/Query.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Query.php b/src/Query.php index d12881b..3b44b67 100644 --- a/src/Query.php +++ b/src/Query.php @@ -729,7 +729,11 @@ private function setDirty(): void $this->parent?->setDirty(); - $this->dirtyHookCallback?->call($this); + if ($this->dirtyHookCallback) { + $dirtyHookCallback = $this->dirtyHookCallback; + + $dirtyHookCallback(); + } } /**