mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Silently ignore if the hook does not exist
This commit is contained in:
parent
687c9a6690
commit
b4448f7279
@ -95,7 +95,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