diff --git a/Console/TaskMailNotify.php b/Console/TaskMailNotify.php index 2acaf34..3676e1a 100644 --- a/Console/TaskMailNotify.php +++ b/Console/TaskMailNotify.php @@ -23,10 +23,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $tasks = array(); $emails = $this->helper->mailHelper->checkMailBox(); - // FIXME invalid Task# $tasks = array(); foreach ($emails as $email) { - $task = $this->taskFinderModel->getById($email['task_id']); + if (($task = $this->taskFinderModel->getById($email['task_id'])) == null) continue; $task['project_name'] = $this->projectModel->getById($task['project_id'])['name']; $task['email'] = $email['email']; $tasks[] = $task;