From fa7f03bba00cafdd245fc7d45b8a6915b50833de Mon Sep 17 00:00:00 2001 From: ditsuke Date: Sun, 5 Sep 2021 18:26:43 +0530 Subject: [PATCH] Fix fatal task failure check Fixes the failure check (the lock should not be null) and enhances a comment + styling. --- administrator/components/com_scheduler/src/Task/Task.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_scheduler/src/Task/Task.php b/administrator/components/com_scheduler/src/Task/Task.php index f34d1cf1d6919..c37f80ecbdeee 100644 --- a/administrator/components/com_scheduler/src/Task/Task.php +++ b/administrator/components/com_scheduler/src/Task/Task.php @@ -134,9 +134,9 @@ public function run(): bool /* * Dispatch event if task lock is not released (NULL). This only happens if the task execution * was interrupted by a fatal failure. - * @todo add listeners. We can have Email, PushBullet, etc + * @todo add listeners. We can have opt-in hooks for email (priority), push-bullet, etc */ - if ($this->get('locked') === null) + if ($this->get('locked') !== null) { $event = AbstractEvent::create('onTaskRecoverFailure', [ 'subject' => $this