From 407f3e2c2b01c5804e25657280c9730a48a9aa78 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Sun, 1 Aug 2021 19:24:16 +0100 Subject: [PATCH] Fix mailing task when there are no tasks --- CRM/Mailing/Task.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Mailing/Task.php b/CRM/Mailing/Task.php index 721175fabe2f..efc6d3d82c63 100644 --- a/CRM/Mailing/Task.php +++ b/CRM/Mailing/Task.php @@ -80,10 +80,10 @@ public static function getTask($value) { $value = self::TASK_PRINT; } - return [ - self::$_tasks[$value]['class'], - self::$_tasks[$value]['result'], - ]; + if (isset(self::$_tasks[$value])) { + return [[self::$_tasks[$value]['class']], self::$_tasks[$value]['result']]; + } + return [[], NULL]; } }