diff --git a/view/templates/head.tpl b/view/templates/head.tpl
index 75a676a91e..b3dfbc1f4e 100644
--- a/view/templates/head.tpl
+++ b/view/templates/head.tpl
@@ -45,9 +45,11 @@
+{{if is_array($addon_hooks)}}
{{foreach $addon_hooks as $addon_hook}}
{{/foreach}}
+{{/if}}