Misc errors cleanup (#14257)

* Misc errors cleanup

* Rename the variable in the loop to match

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Jellyfrog
2022-08-30 16:00:12 +02:00
committed by GitHub
parent 673ad552a1
commit 797d73ad16
2 changed files with 5 additions and 5 deletions

View File

@@ -109,7 +109,7 @@ class Plugins
foreach ((array) $hooks as $hookName) {
if ($hookName[0] != '_') {
self::$plugins[$hookName][] = $class;
self::$plugins[$hookName][] = $plugin;
}
}
}
@@ -183,12 +183,12 @@ class Plugins
ob_start();
if (! empty(self::$plugins[$hook])) {
foreach (self::$plugins[$hook] as $name) {
foreach (self::$plugins[$hook] as $plugin) {
try {
if (! is_array($params)) {
@call_user_func([$name, $hook]);
@call_user_func([$plugin, $hook]);
} else {
@call_user_func_array([$name, $hook], $params);
@call_user_func_array([$plugin, $hook], $params);
}
} catch (\Exception $e) {
Log::error($e);