Code cleanup
authorColeman Watts <coleman@civicrm.org>
Wed, 27 Aug 2014 20:28:19 +0000 (21:28 +0100)
committerColeman Watts <coleman@civicrm.org>
Wed, 27 Aug 2014 20:28:19 +0000 (21:28 +0100)
CRM/Core/BAO/CustomField.php

index b80f086842b62e5babd3108d3be9f36a52a28e9e..24a8782ceff38bfab3947b9cc18e9aa2b114cb37 100644 (file)
@@ -411,11 +411,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
       }
     }
 
-    if ($customDataSubType && !is_array($customDataSubType)) {
-      $customDataSubType = explode(CRM_Core_DAO::VALUE_SEPARATOR,
-        trim($customDataSubType, CRM_Core_DAO::VALUE_SEPARATOR)
-      );
-    }
+    $customDataSubType = CRM_Utils_Array::explodePadded($customDataSubType);
 
     if (is_array($customDataType)) {
       $cacheKey = implode('_', $customDataType);
@@ -684,8 +680,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         );
       }
     }
-    return $all ? array(
-      NULL, NULL) : NULL;
+    return $all ? array(NULL, NULL) : NULL;
   }
 
   /**