Merge pull request #24117 from civicrm/5.52
[civicrm-core.git] / CRM / Custom / Form / CustomData.php
index 8d2803cce8c3903fcee250ebb7773d449eef44fc..79c9d68c601c410d8ac044ba5704887041533e72 100644 (file)
@@ -143,7 +143,7 @@ class CRM_Custom_Form_CustomData {
     $getCachedTree = $form->_getCachedTree ?? TRUE;
 
     $subType = $form->_subType;
-    if (!is_array($subType) && strstr($subType, CRM_Core_DAO::VALUE_SEPARATOR)) {
+    if (!is_array($subType) && strstr(($subType ?? ''), CRM_Core_DAO::VALUE_SEPARATOR)) {
       $subType = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', trim($subType, CRM_Core_DAO::VALUE_SEPARATOR));
     }