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 687c9a6 commit b4448f7
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 @@ -95,7 +95,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 b4448f7

Please sign in to comment.