Jelajahi Sumber

Fix bug where reporting month cannot be unset

Alan Lam 8 tahun lalu
induk
melakukan
b75d5d1e57
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      controllers/project_edit.php

+ 1 - 1
controllers/project_edit.php

@@ -72,7 +72,7 @@ if($submit) {
 
 		$project->dts_start = Util::getDateTime($unix_start);
 		$project->dts_deadline = Util::getDateTime($unix_deadline);
-		$project->dts_report = Util::getDateTime($unix_report);
+		$project->dts_report = is_null($unix_rpeort) ? null : Util::getDateTime($unix_report);
 
 		if($unix_start > $unix_deadline) $form_exception->addError("Start Date cannot be after the Deadline.");