Skip to content

Commit

Permalink
Silently ignore if the hook does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Dec 28, 2023
1 parent 08d67a0 commit e26e6f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion system/twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@
global $hooks;

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;
Expand Down

0 comments on commit e26e6f3

Please sign in to comment.