]> git.mxchange.org Git - friendica.git/commitdiff
Test if addon_hooks is an array before using it
authorPascal Deklerck <pascal.deklerck@gmail.com>
Wed, 13 Jun 2018 19:04:21 +0000 (21:04 +0200)
committerPascal Deklerck <pascal.deklerck@gmail.com>
Wed, 13 Jun 2018 19:05:54 +0000 (21:05 +0200)
view/templates/head.tpl

index 75a676a91ebe279fa55879ca8b288797a80fee15..b3dfbc1f4e0e0923b789edfd5ace8fc89d5d5e84 100644 (file)
 <script type="text/javascript" src="view/js/acl.js" ></script>
 <script type="text/javascript" src="view/asset/base64/base64.min.js" ></script>
 <script type="text/javascript" src="view/js/addon-hooks.js" ></script>
+{{if is_array($addon_hooks)}}
 {{foreach $addon_hooks as $addon_hook}}
 <script type="text/javascript" src="addon/{{$addon_hook}}/{{$addon_hook}}.js"></script>
 {{/foreach}}
+{{/if}}
 <script type="text/javascript" src="view/js/main.js" ></script>
 <script>