minor fix
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 28 Jul 2016 13:09:56 +0000 (18:39 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 28 Jul 2016 13:09:56 +0000 (18:39 +0530)
CRM/Custom/Form/Group.php

index b981bbaff74ad135a1f548df760578ca21eb0084..bb6bd34da7486eda067498a9d146e715e6b04f9d 100644 (file)
@@ -463,7 +463,7 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
         $subtypesToBeRemoved = array();
         $subtypesToPreserve = $params['extends'][1];
         // Don't remove any value if group is extended to -any- subtype
-        if (!empty(current($subtypesToPreserve))) {
+        if (!empty($subtypesToPreserve[0])) {
           $subtypesToBeRemoved = array_diff($this->_subtypes, array_intersect($this->_subtypes, $subtypesToPreserve));
         }
         CRM_Contact_BAO_ContactType::deleteCustomRowsOfSubtype($this->_id, $subtypesToBeRemoved, $subtypesToPreserve);