Fixed Error Line 686
authorAugusto Teixeira da Costa <gustotc@gmail.com>
Thu, 1 Dec 2016 16:25:10 +0000 (14:25 -0200)
committerGitHub <noreply@github.com>
Thu, 1 Dec 2016 16:25:10 +0000 (14:25 -0200)
Error: Divid By Zero

classes/Misc.php

index b0b5a74cbb1a37fe799fb6579f051b2b814b8dc0..1ca0366bcb2f96376ebf4f6640b3a20953f254a4 100644 (file)
                        echo "<table class=\"tabs\"><tr>\n";
                        #echo "<div class=\"tabs\">\n";
 
-                       # FIXME: don't count hidden tabs
-                       $width = (int)(100 / count($tabs)).'%';
+                       # FIXME: Add if - Augusto 01/12/2016
+                       if (count($tabs) > 0) 
+                               $width = (int)(100 / count($tabs)).'%';
+                       else
+                               $width = 1;
 
                        foreach ($tabs as $tab_id => $tab) {
                                $active = ($tab_id == $activetab) ? ' active' : '';