diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-03-06 11:45:31 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-03-06 11:45:31 +0100 |
commit | 1334236bb6059b2302a760196ce7885df379e984 (patch) | |
tree | f86e883e6ae9510454307f38be3ffd20aefa6c4c /src/HookManager.php | |
parent | ad83d1dafac62bb28fda004f86129319a5c3e2ca (diff) |
toml to yaml
Diffstat (limited to 'src/HookManager.php')
-rw-r--r-- | src/HookManager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HookManager.php b/src/HookManager.php index 0f252c8..215ff58 100644 --- a/src/HookManager.php +++ b/src/HookManager.php @@ -19,7 +19,7 @@ class HookManager public function doAction(string $name, mixed ...$arguments): void { - foreach ($this->actions[$name] as $actions) { + foreach ($this->actions[$name] ?? [] as $actions) { foreach ($actions as $action) { call_user_func_array($action['function'], $arguments); } @@ -31,7 +31,7 @@ class HookManager // set $value as first argument array_unshift($arguments, $value); - foreach ($this->filters[$name] as $filters) { + foreach ($this->filters[$name] ?? [] as $filters) { foreach ($filters as $filter) { $value = call_user_func_array($filter['function'], $arguments); } |