CRM-14106 - Regex targeting other conditionals
[civicrm-core.git] / CRM / Contact / Form / Location.php
index 3e3694110512867db68bd70c80f50982307cf6e6..c42e370863eac12781ed64bd93ea6c50dfe26acf 100644 (file)
@@ -91,7 +91,7 @@ class CRM_Contact_Form_Location {
       if (!empty($_POST[$name]) && is_array($_POST[$name])) {
         $instances = array_keys($_POST[$name]);
       }
-      elseif (property_exists($form, '_values') && CRM_Utils_Array::value($name, $form->_values) && is_array($form->_values[$name])) {
+      elseif (property_exists($form, '_values') && !empty($form->_values[$name]) && is_array($form->_values[$name])) {
         $instances = array_keys($form->_values[$name]);
       }