From 31365d7d0dfe47c739d9ca7e6b198b184f2e038f Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 4 Jan 2024 10:39:05 +1300 Subject: [PATCH] Do not fatal if params is not an array --- CRM/Contribute/BAO/ContributionSoft.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Contribute/BAO/ContributionSoft.php b/CRM/Contribute/BAO/ContributionSoft.php index 2a2885c95f..4fbad1a2f5 100644 --- a/CRM/Contribute/BAO/ContributionSoft.php +++ b/CRM/Contribute/BAO/ContributionSoft.php @@ -498,6 +498,10 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio } } } + if (!is_array($params)) { + CRM_Core_Error::deprecatedWarning('this could indicate a bug - see https://lab.civicrm.org/dev/core/-/issues/4881'); + $params = []; + } //remove name related fields and construct name string with prefix/suffix //which will be later assigned to template -- 2.25.1