From ee10989d0017446eb0706d1bcae44a134a8cf44e Mon Sep 17 00:00:00 2001 From: olayiwola-compucorp Date: Fri, 2 Dec 2022 10:47:50 +0100 Subject: [PATCH] MAE-975: Fix settings page error The eventextras settings page was returning CiviCRM WSOD because it is mandatory in PHP8 for the first parameter in array_fill_key to be an array. --- CRM/EventsExtras/Form/Settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/EventsExtras/Form/Settings.php b/CRM/EventsExtras/Form/Settings.php index 3ce210a..b64f694 100644 --- a/CRM/EventsExtras/Form/Settings.php +++ b/CRM/EventsExtras/Form/Settings.php @@ -249,7 +249,8 @@ public function setDefaultValues() { } $defaults['eventsextras_payment_processor_selection_default'] = - array_fill_keys($defaults['eventsextras_payment_processor_selection_default'], '1'); + is_array($defaults['eventsextras_payment_processor_selection_default']) ? + array_fill_keys($defaults['eventsextras_payment_processor_selection_default'], '1') : NULL; return $defaults; }