Ordering hooks by context

This commit is contained in:
Jé GDSOFT 2022-12-12 10:26:51 +01:00
parent 570fc5c0ed
commit 8a8519e520

View File

@ -131,8 +131,10 @@ class HookManager
dol_syslog(get_class($this)."::initHooks Loading hooks: ".join(', ', $arraytolog), LOG_DEBUG);
}
if (!empty($this->hooks[$context])) {
ksort($this->hooks[$context], SORT_NATURAL);
foreach ($arraycontext as $context) {
if (!empty($this->hooks[$context])) {
ksort($this->hooks[$context], SORT_NATURAL);
}
}
return 1;