From 57c273b2dae918e1b007c1f1d1cd37ec9f6fb248 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 1 Sep 2015 17:58:23 +0200 Subject: [PATCH] Fix closures and adding parsed Actions --- lib/private/notification/manager.php | 4 ++-- lib/private/notification/notification.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/notification/manager.php b/lib/private/notification/manager.php index f14929642d..eee03d93db 100644 --- a/lib/private/notification/manager.php +++ b/lib/private/notification/manager.php @@ -71,7 +71,7 @@ class Manager implements IManager { } foreach ($this->appsClosures as $closure) { - $app = $closure; + $app = $closure(); if (!($app instanceof IApp)) { throw new \InvalidArgumentException('The given notification app does not implement the IApp interface'); } @@ -90,7 +90,7 @@ class Manager implements IManager { } foreach ($this->notifiersClosures as $closure) { - $notifier = $closure; + $notifier = $closure(); if (!($notifier instanceof INotifier)) { throw new \InvalidArgumentException('The given notification app does not implement the INotifier interface'); } diff --git a/lib/private/notification/notification.php b/lib/private/notification/notification.php index 17246ddef3..f5171f150c 100644 --- a/lib/private/notification/notification.php +++ b/lib/private/notification/notification.php @@ -393,7 +393,7 @@ class Notification implements INotification { if (!$action->isValidParsed()) { throw new \InvalidArgumentException('The given parsed action is invalid'); } - $this->actions[] = $action; + $this->actionsParsed[] = $action; return $this; }