[REF][PHP8.2] address dynamic properties in CRM_Event_Form_SearchEvent
authorBradley Taylor <hello@brad-taylor.co.uk>
Sun, 10 Dec 2023 10:32:29 +0000 (10:32 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sun, 10 Dec 2023 10:32:29 +0000 (10:32 +0000)
CRM/Event/Form/SearchEvent.php

index 297e971856cb3ca77461ab1ac5437c67dca2f48f..ef755d6871a5908fa7071b6b8b35b9d152a54ed0 100644 (file)
@@ -30,12 +30,12 @@ class CRM_Event_Form_SearchEvent extends CRM_Core_Form {
     $defaults = [];
     $defaults['eventsByDates'] = 0;
 
-    $this->_showHide = new CRM_Core_ShowHideBlocks();
+    $showHide = new CRM_Core_ShowHideBlocks();
     if (empty($defaults['eventsByDates'])) {
-      $this->_showHide->addHide('id_fromToDates');
+      $showHide->addHide('id_fromToDates');
     }
 
-    $this->_showHide->addToTemplate();
+    $showHide->addToTemplate();
     return $defaults;
   }
 
@@ -51,7 +51,6 @@ class CRM_Event_Form_SearchEvent extends CRM_Core_Form {
 
     $this->addSelect('event_type_id', ['multiple' => TRUE, 'context' => 'search']);
 
-    $eventsByDates = [];
     $searchOption = [ts('Show Current and Upcoming Events'), ts('Search All or by Date Range')];
     $this->addRadio('eventsByDates', ts('Events by Dates'), $searchOption, ['onclick' => "return showHideByValue('eventsByDates','1','id_fromToDates','block','radio',true);"], '&nbsp;');