Merge pull request #23188 from gdsoftdev/hook_order_execution

FIX: Hook order execution
This commit is contained in:
Laurent Destailleur 2022-12-17 01:40:29 +01:00 committed by GitHub
commit 4d8d83e6e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;