summaryrefslogtreecommitdiff
path: root/htdocs
diff options
context:
space:
mode:
authordeva <deva>2009-04-28 18:10:16 +0000
committerdeva <deva>2009-04-28 18:10:16 +0000
commit39cf1d3a2741e979ee94ea94f479e173a4437067 (patch)
tree7bfba4f2babb6de19c22634df40d6fc3f8bd4d3e /htdocs
parent7bc354f572a23b5e7239995f06d3d10c1cd33c8a (diff)
Removed foreach warnings on empty arrays.
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/index.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/htdocs/index.php b/htdocs/index.php
index 797f10b..4ca2c36 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -58,10 +58,12 @@ foreach($ps as $p) {
?>>
<?php
$menu = $config->value('menu');
-foreach($menu as $_m => $_t) {
- echo " <a href=\"?page=".$_m."\" class=\"menu_entry_".$_m."\"></a>\n";
- echo " <a href=\"?page=".$_m."\" class=\"menutitle\">".$t."</a>\n";
- echo "\n";
+if(sizeof($menu)) {
+ foreach($menu as $_m => $_t) {
+ echo " <a href=\"?page=".$_m."\" class=\"menu_entry_".$_m."\"></a>\n";
+ echo " <a href=\"?page=".$_m."\" class=\"menutitle\">".$t."</a>\n";
+ echo "\n";
+ }
}
?>
</div>