From: Bradley Taylor Date: Mon, 29 Aug 2022 10:49:02 +0000 (+0100) Subject: Stop PHP notice when accessing invalid event ID X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a8fb6664814b7c10bdd5cebea2a30ba7b9cf1af4;p=civicrm-core.git Stop PHP notice when accessing invalid event ID --- diff --git a/CRM/Event/Page/EventInfo.php b/CRM/Event/Page/EventInfo.php index 778549e3e5..92ffc131e1 100644 --- a/CRM/Event/Page/EventInfo.php +++ b/CRM/Event/Page/EventInfo.php @@ -61,7 +61,7 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { $values = ['event' => NULL]; CRM_Event_BAO_Event::retrieve($params, $values['event']); - if (!$values['event']['is_active']) { + if (!$values['event'] || !$values['event']['is_active']) { CRM_Utils_System::setUFMessage(ts('The event you requested is currently unavailable (contact the site administrator for assistance).')); return CRM_Utils_System::permissionDenied(); }