From 0d874ad9affe6a40f0da0dfbdde9f7bb5b802099 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jun 2011 14:39:05 +0000 Subject: [PATCH] Fix: Removed warning --- htdocs/lib/functions.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index a5e3815ea7b..cd43c2754b4 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -489,7 +489,8 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto // Define max of key (max may be higher than sizeof becaus of hole due to module disabling some tabs). $keys=array_keys($links); - $maxkey=max($keys); + if (sizeof($keys)) $maxkey=max($keys); + else $maxkey=-1; // Show tabs for ($i = 0 ; $i <= $maxkey ; $i++)