mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 17:59:22 +02:00
Silently ignore if the hook does not exist
This commit is contained in:
parent
08d67a07e0
commit
e26e6f3a1c
@ -48,7 +48,14 @@ $function = new TwigFunction('hook', function ($context, $hook, array $params =
|
|||||||
global $hooks;
|
global $hooks;
|
||||||
|
|
||||||
if(is_string($hook)) {
|
if(is_string($hook)) {
|
||||||
$hook = constant($hook);
|
if (defined($hook)) {
|
||||||
|
$hook = constant($hook);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// plugin/template has a hook that this version of myaac does not support
|
||||||
|
// just silently return
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$params['context'] = $context;
|
$params['context'] = $context;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user