Merge pull request #23213 from eileenmcnaughton/post
[civicrm-core.git] / CRM / Event / Form / Search.php
index ac4404ca6de11e530b1b2f84dcebfa42bd935a0a..0c2ce4dbf53b0adaeb49ea72987d4f34d26a8dea 100644 (file)
@@ -200,9 +200,9 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search {
           'id' => $this->_ssID,
           'name' => CRM_Contact_BAO_SavedSearch::getName($this->_ssID, 'title'),
         ];
-        $this->assign_by_ref('savedSearch', $savedSearchValues);
-        $this->assign('ssID', $this->_ssID);
       }
+      $this->assign('savedSearch', $savedSearchValues ?? NULL);
+      $this->assign('ssID', $this->_ssID);
 
       $this->addTaskMenu($tasks);
     }