diff options
-rw-r--r-- | app/Subscriber/NotificationSubscriber.php | 13 | ||||
-rw-r--r-- | docs/postgresql-configuration.markdown | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/app/Subscriber/NotificationSubscriber.php b/app/Subscriber/NotificationSubscriber.php index 94815b56..09ca7625 100644 --- a/app/Subscriber/NotificationSubscriber.php +++ b/app/Subscriber/NotificationSubscriber.php @@ -47,10 +47,13 @@ class NotificationSubscriber extends Base implements EventSubscriberInterface public function execute(GenericEvent $event, $event_name) { $values = $this->getTemplateData($event); - $users = $this->notification->getUsersList($values['task']['project_id']); - if (! empty($users)) { - $this->notification->sendEmails($this->templates[$event_name], $users, $values); + if (isset($values['task']['project_id'])) { + $users = $this->notification->getUsersList($values['task']['project_id']); + + if (! empty($users)) { + $this->notification->sendEmails($this->templates[$event_name], $users, $values); + } } } @@ -64,11 +67,11 @@ class NotificationSubscriber extends Base implements EventSubscriberInterface break; case 'Event\SubtaskEvent': $values['subtask'] = $this->subtask->getById($event['id'], true); - $values['task'] = $this->taskFinder->getDetails($event['task_id']); + $values['task'] = $this->taskFinder->getDetails($values['subtask']['task_id']); break; case 'Event\FileEvent': $values['file'] = $event->getAll(); - $values['task'] = $this->taskFinder->getDetails($event['task_id']); + $values['task'] = $this->taskFinder->getDetails($values['file']['task_id']); break; case 'Event\CommentEvent': $values['comment'] = $this->comment->getById($event['id']); diff --git a/docs/postgresql-configuration.markdown b/docs/postgresql-configuration.markdown index 9f88a526..3c07ff16 100644 --- a/docs/postgresql-configuration.markdown +++ b/docs/postgresql-configuration.markdown @@ -9,7 +9,7 @@ Requirements - A Postgresql server already installed and configured - The PHP extension `pdo_pgsql` installed (Debian/Ubuntu: `apt-get install php5-pgsql`) -Note: Kanboard is tested with **Postgresql >= 9.4** +Note: Kanboard is tested with **Postgresql 9.3 and 9.4** Configuration ------------- |