Test if addon_hooks is an array before using it

This commit is contained in:
Pascal Deklerck 2018-06-13 21:04:21 +02:00
parent b54d1b708a
commit ba4ddb1d8d

View file

@ -45,9 +45,11 @@
<script type="text/javascript" src="view/js/acl.js" ></script> <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/asset/base64/base64.min.js" ></script>
<script type="text/javascript" src="view/js/addon-hooks.js" ></script> <script type="text/javascript" src="view/js/addon-hooks.js" ></script>
{{if is_array($addon_hooks)}}
{{foreach $addon_hooks as $addon_hook}} {{foreach $addon_hooks as $addon_hook}}
<script type="text/javascript" src="addon/{{$addon_hook}}/{{$addon_hook}}.js"></script> <script type="text/javascript" src="addon/{{$addon_hook}}/{{$addon_hook}}.js"></script>
{{/foreach}} {{/foreach}}
{{/if}}
<script type="text/javascript" src="view/js/main.js" ></script> <script type="text/javascript" src="view/js/main.js" ></script>
<script> <script>