Skip to content

Commit dcfda85

Browse files
committed
fix hooks
1 parent daf3c86 commit dcfda85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/Library/CrudPanel/Hooks/LifecycleHooks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public function trigger(string|array $hooks, array $parameters = []): void
2525

2626
foreach ($hooks as $hook) {
2727
// Create a unique identifier for this controller+hook combination
28-
$hookId = is_null($controller) ? '' : (is_string($controller) ? $controller : $controller::class.'::'.$hook);
28+
// Include the full hook name (which includes operation) to ensure uniqueness per operation
29+
$hookId = is_null($controller) ? $hook : (is_string($controller) ? $controller : $controller::class).'::'.$hook;
2930

3031
// Skip if this hook has already been executed
3132
if (isset($this->executedHooks[$hookId])) {

0 commit comments

Comments
 (0)