Skip to content

Commit

Permalink
Ignore unknown task_id for notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredbuehler committed Aug 5, 2024
1 parent 54f0c0c commit 9d039c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Console/TaskMailNotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9d039c9

Please sign in to comment.