E-notice fix when no template exists
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 7 Dec 2023 19:12:02 +0000 (08:12 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 7 Dec 2023 19:12:02 +0000 (08:12 +1300)
CRM/Import/Forms.php

index f794fb662eccc61f16accbf55c65fc93a35cd538..81989b595017fd95b733b64aff8f141e34fe9b9d 100644 (file)
@@ -953,7 +953,7 @@ class CRM_Import_Forms extends CRM_Core_Form {
       ->addWhere('name', '=', 'import_' . $mappingName)
       ->addWhere('is_template', '=', TRUE)
       ->execute()->first();
-    $this->templateID = $templateJob['id'];
+    $this->templateID = $templateJob['id'] ?? NULL;
     return $templateJob ?? NULL;
   }