diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index ea2ba75..2d42e07 100755 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -11,7 +11,7 @@ class MY_Controller extends CI_Controller { public $session; /** - * @var CI_DB_query_builder + * @var CI_DB_driver */ public $db; diff --git a/application/libraries/Validation_callbacks.php b/application/libraries/Validation_callbacks.php index 93b1feb..ca21103 100755 --- a/application/libraries/Validation_callbacks.php +++ b/application/libraries/Validation_callbacks.php @@ -31,7 +31,7 @@ class Validation_callbacks { //Verify date format $date_pattern = '/(20|1[0-9])[0-9]{2}\-(1[0-2]|0[1-9])\-(3[0-1]|2[0-8]|1[0-9]|0[1-9])/'; - if ( ! (bool) preg_match($date_pattern, $due)) + if ( ! (bool) preg_match($date_pattern, $due) && $due != 0) { $this->CI->form_validation->set_message('validate', 'You must enter a due date in YYYY-MM-DD format.'); return FALSE; diff --git a/application/models/task_model.php b/application/models/task_model.php index 1704fa9..7878c50 100755 --- a/application/models/task_model.php +++ b/application/models/task_model.php @@ -411,7 +411,7 @@ class Task_model extends CI_Model { if ( ! $valid) { - $err = array_merge($err, $this->form_validation->get_error_array()); + $err = array_merge($err, (array)$this->form_validation->get_error_array()); } //Check due date diff --git a/application/views/task/edit.php b/application/views/task/edit.php index f6594c6..99849a8 100755 --- a/application/views/task/edit.php +++ b/application/views/task/edit.php @@ -11,12 +11,12 @@