From 67b72e5b067852c1be5aeea27bc063f3a957a664 Mon Sep 17 00:00:00 2001 From: Bob Le Bricodeur <Mr.Bricodage@gmail.com> Date: Sat, 15 Nov 2014 01:38:23 +0100 Subject: [PATCH] remove warning "unknown index horaire0" one first access to choix_date.php --- choix_date.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/choix_date.php b/choix_date.php index 0280ab17..21d60642 100644 --- a/choix_date.php +++ b/choix_date.php @@ -213,8 +213,8 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp </legend>'."\n"; // Fields hours : 3 by default - for ($j=0;$j<max(count($_SESSION['horaires'.$i]),3);$j++) { - $hour_value = isset($_SESSION['horaires'.$i][$j]) ? $_SESSION['horaires'.$i][$j] : ''; + for ($j=0;$j<max(count(isset($_SESSION["horaires".$i]) ? $_SESSION["horaires".$i] : 0),3);$j++) { + $hour_value = isset($_SESSION["horaires".$i][$j]) ? $_SESSION["horaires".$i][$j] : ''; echo ' <div class="col-sm-2"> <label for="d'.$i.'-h'.$j.'" class="sr-only control-label">'. _("Time") .' '. ($j+1) .'</label> -- GitLab