CRM-14959 - PHP Fatal Error when Address State is Set to View Only
authoratif-shaikh <shaikh388@gmail.com>
Wed, 9 Jul 2014 12:19:07 +0000 (17:49 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Wed, 9 Jul 2014 12:19:07 +0000 (17:49 +0530)
https://issues.civicrm.org/jira/browse/CRM-14959

CRM/Contact/Form/Edit/Address.php

index d76a4379a60d895b7ba9dc440ba811c1c451bc56..b32044a09ff872e79b10597374a088db938acd10 100644 (file)
@@ -473,7 +473,8 @@ class CRM_Contact_Form_Edit_Address {
     // CRM-7296 freeze the select for state if address is shared with household
     // CRM-9070 freeze the select for state if it is view only
     if (isset($form->_fields) && !empty($form->_fields[$stateElementName]) &&
-      (!empty($form->_fields[$stateElementName]['is_shared']) || !empty($form->_fields[$stateElementName]['is_view']))
+      (!empty($form->_fields[$stateElementName]['is_shared']) || !empty($form->_fields[$stateElementName]['is_view'])) &&
+      !empty($stateSelect)
     ) {
       $stateSelect->freeze();
     }