From ad3247ea15375d13d57ba935f2e0c3b027c87427 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Wed, 28 Dec 2022 20:35:28 +0000 Subject: [PATCH] Fix strstr deprecation in CustomDataByType class --- CRM/Custom/Form/CustomDataByType.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Custom/Form/CustomDataByType.php b/CRM/Custom/Form/CustomDataByType.php index 2abfdf37eeae..d7d22e9104d9 100644 --- a/CRM/Custom/Form/CustomDataByType.php +++ b/CRM/Custom/Form/CustomDataByType.php @@ -48,7 +48,8 @@ public function preProcess() { if (array_key_exists($this->_type, $contactTypes)) { $this->assign('contactId', $this->_entityId); } - if (!is_array($this->_subType) && strstr($this->_subType, CRM_Core_DAO::VALUE_SEPARATOR)) { + if (!is_array($this->_subType) && strstr($this->_subType ?? '', CRM_Core_DAO::VALUE_SEPARATOR)) { + CRM_Core_Error::deprecatedWarning('Using a CRM_Core_DAO::VALUE_SEPARATOR separated subType on civicrm/custom route is deprecated, use a comma-separated string instead.'); $this->_subType = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', trim($this->_subType, CRM_Core_DAO::VALUE_SEPARATOR)); } CRM_Custom_Form_CustomData::setGroupTree($this, $this->_subType, $this->_groupID, $this->_onlySubtype);