diff options
-rwxr-xr-x | www-ssl/admin/shiftadd.php | 7 |
1 files 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 |