summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAugusto Teixeira da Costa2016-12-01 16:25:10 +0000
committerRobert Treat2018-11-12 21:06:59 +0000
commit029901d1133fadea3f735e623827c424199e3236 (patch)
tree33b5f1fddff843cdbf1cfa1b94a3ba7c70ab4639
parent43e67ae44dd87083e50854922d41792706491036 (diff)
Fixed Error Line 686
Error: Divid By Zero
-rw-r--r--classes/Misc.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/Misc.php b/classes/Misc.php
index 06126c83..6714bb48 100644
--- a/classes/Misc.php
+++ b/classes/Misc.php
@@ -682,8 +682,10 @@
echo "<table class=\"tabs\"><tr>\n";
#echo "<div class=\"tabs\">\n";
- # FIXME: don't count hidden tabs
- $width = (int)(100 / count($tabs)).'%';
+ if (count($tabs) > 0)
+ $width = (int)(100 / count($tabs)).'%';
+ else
+ $width = 1;
foreach ($tabs as $tab_id => $tab) {
$active = ($tab_id == $activetab) ? ' active' : '';