Remove App dependency from Hook::callSingle

- This was causing a circular dependency with the logger_instance hook
This commit is contained in:
Hypolite Petovan 2023-01-13 21:10:59 -05:00
parent 79d1506694
commit e73adde5fb
8 changed files with 37 additions and 67 deletions

View file

@ -51,7 +51,7 @@ class Expire
foreach (Hook::getByName('expire') as $hook) {
if ($hook[1] == $hook_function) {
Logger::info('Calling expire hook', ['hook' => $hook[1]]);
Hook::callSingle($a, 'expire', $hook, $data);
Hook::callSingle('expire', $hook, $data);
}
}
return;

View file

@ -28,8 +28,6 @@ Class ForkHook
{
public static function execute($name, $hook, $data)
{
$a = DI::app();
Hook::callSingle($a, $name, $hook, $data);
Hook::callSingle($name, $hook, $data);
}
}