From: atif-shaikh Date: Wed, 9 Jul 2014 12:19:07 +0000 (+0530) Subject: CRM-14959 - PHP Fatal Error when Address State is Set to View Only X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6a879fd067a66f15b0159f7ed38528cc1830243e;p=civicrm-core.git CRM-14959 - PHP Fatal Error when Address State is Set to View Only https://issues.civicrm.org/jira/browse/CRM-14959 --- diff --git a/CRM/Contact/Form/Edit/Address.php b/CRM/Contact/Form/Edit/Address.php index d76a4379a6..b32044a09f 100644 --- a/CRM/Contact/Form/Edit/Address.php +++ b/CRM/Contact/Form/Edit/Address.php @@ -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(); }