Fix notices on tasks for less permissioned user
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 14 Dec 2023 07:05:51 +0000 (20:05 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 14 Dec 2023 07:05:51 +0000 (20:05 +1300)
CRM/Event/Task.php

index d599e310612732e45367ec979f8979bc531d5b94..3c7ba4aca13884eda09c85bf8f80ae0453fc97e2 100644 (file)
@@ -151,13 +151,13 @@ class CRM_Event_Task extends CRM_Core_Task {
     }
     else {
       $tasks = [
-        self::TASK_EXPORT => self::$_tasks[self::TASK_EXPORT]['title'],
-        self::TASK_EMAIL => self::$_tasks[self::TASK_EMAIL]['title'],
+        self::TASK_EXPORT => self::tasks()[self::TASK_EXPORT]['title'],
+        self::TASK_EMAIL => self::tasks()[self::TASK_EMAIL]['title'],
       ];
 
       //CRM-4418,
       if (CRM_Core_Permission::check('delete in CiviEvent')) {
-        $tasks[self::TASK_DELETE] = self::$_tasks[self::TASK_DELETE]['title'];
+        $tasks[self::TASK_DELETE] = self::tasks()[self::TASK_DELETE]['title'];
       }
     }