diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 3844d8eeb50..f3271535bcd 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -160,7 +160,7 @@ if ($action == 'addtimespent' && $user->rights->projet->lire) $object->timespent_note = $_POST["timespent_note"]; $object->progress = GETPOST('progress', 'int'); $object->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds - $object->timespent_duration+= $_POST["timespent_durationmin"]*60; // We store duration in seconds + $object->timespent_duration+= ($_POST["timespent_durationmin"]?$_POST["timespent_durationmin"]:0)*60; // We store duration in seconds if (GETPOST("timehour") != '' && GETPOST("timehour") >= 0) // If hour was entered { $object->timespent_date = dol_mktime(GETPOST("timehour"),GETPOST("timemin"),0,GETPOST("timemonth"),GETPOST("timeday"),GETPOST("timeyear"));