From: Coleman Watts Date: Fri, 4 Sep 2015 05:17:49 +0000 (-0700) Subject: cleanup explodePadded X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1b23469de22148205e5a2512b4c2eaff603de556;p=civicrm-core.git cleanup explodePadded --- diff --git a/CRM/Contact/BAO/ContactType.php b/CRM/Contact/BAO/ContactType.php index e9a9c4e6b1..2b5d2b1e3e 100644 --- a/CRM/Contact/BAO/ContactType.php +++ b/CRM/Contact/BAO/ContactType.php @@ -526,9 +526,7 @@ WHERE subtype.name IN ('" . implode("','", $subType) . "' )"; * true if contact extends, false otherwise. */ public static function isExtendsContactType($subType, $contactType, $ignoreCache = FALSE, $columnName = 'name') { - if (!is_array($subType)) { - $subType = explode(CRM_Core_DAO::VALUE_SEPARATOR, trim($subType, CRM_Core_DAO::VALUE_SEPARATOR)); - } + $subType = (array) CRM_Utils_Array::explodePadded($subType); $subtypeList = self::subTypes($contactType, TRUE, $columnName, $ignoreCache); $intersection = array_intersect($subType, $subtypeList); return $subType == $intersection;