Fix a fix

This commit is contained in:
Laurent Destailleur
2011-06-13 13:44:50 +00:00
parent f46492befe
commit b8574ef39d
2 changed files with 15 additions and 9 deletions

View File

@@ -487,10 +487,13 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto
print '</a>';
}
// Define max of key (max may be higher than sizeof becaus of hole due to module disabling some tabs).
$keys=array_keys($links);
if (sizeof($keys)) $maxkey=max($keys);
else $maxkey=-1;
// Define max of key (max may be higher than sizeof because of hole due to module disabling some tabs).
$maxkey=-1;
if (is_array($links))
{
$keys=array_keys($links);
if (sizeof($keys)) $maxkey=max($keys);
}
// Show tabs
for ($i = 0 ; $i <= $maxkey ; $i++)