Fix PHP warning: trying to use null as array
authorNoah Miller <nm@lemnisc.us>
Wed, 20 Dec 2023 06:14:47 +0000 (22:14 -0800)
committerNoah Miller <nm@lemnisc.us>
Wed, 20 Dec 2023 06:22:49 +0000 (22:22 -0800)
CRM/Case/XMLProcessor/Process.php

index a8e398474630f4876551e07a4f1ae9c661398317..1cbc49dc64991093993230d71c141c11d2e8e157 100644 (file)
@@ -263,7 +263,7 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor {
         $maxInstances = (string) $recordXML->max_instances;
         $activityTypeInfo = $activityTypes[$activityTypeName] ?? NULL;
 
-        if ($activityTypeInfo['id']) {
+        if ($activityTypeInfo) {
           if ($maskAction) {
             if ($maskAction == 'edit' && '0' === (string) $recordXML->editable) {
               $result[$maskAction][] = $activityTypeInfo['id'];