From de2c8c72d10b15ae533eecbe4cc351a441b3cc20 Mon Sep 17 00:00:00 2001 From: cookie Date: Tue, 5 Dec 2006 19:28:29 +0000 Subject: [PATCH] abbruch beim fehler git-svn-id: svn://svn.cccv.de/engel-system@201 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/admin/shiftadd.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/www-ssl/admin/shiftadd.php b/www-ssl/admin/shiftadd.php index 15e54735..cefefd89 100755 --- a/www-ssl/admin/shiftadd.php +++ b/www-ssl/admin/shiftadd.php @@ -163,9 +163,8 @@ case 'newsave': foreach ( $lenArrayDummy as $Temp ) { if( isset($Temp2) ) - $lenArray[$Temp2] = intval($Temp)-intval($Temp2); + $lenArray[intval($Temp2)] = intval($Temp)-intval($Temp2); $Temp2 = $Temp; - }//foreach }//IF( $NachtON == "ON" ) @@ -193,7 +192,11 @@ case 'newsave': // define End time if( $_GET["NachtON"] == "ON" ) + { + if( !isset($lenArray[$Time])) die("Zeit $Time h nicht definiert."); $_GET["len"] = $lenArray[$Time]; + if( $_GET["len"]<1) die("len <1"); + } $TimeEnd = $Time+ $_GET["len"]; //Tagesüberschreitung