From: Tim Mallezie Date: Wed, 2 Sep 2015 08:42:58 +0000 (+0200) Subject: check there is an address for contact X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a1154996756e80b5c66c190e8cfbc19a004ccfe6;p=civicrm-core.git check there is an address for contact --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index c0f05bcf98..f8cc5df3ef 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2558,8 +2558,10 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac else { $addressParams = array('contact_id' => $this->contact_id, 'is_billing' => 1); $addressDetails = CRM_Core_BAO_Address::getValues($addressParams); - $addressDetails = array_values($addressDetails); - $values['address'] = $addressDetails[0]['display']; + if (!is_null($addressDetails)) { + $addressDetails = array_values($addressDetails); + $values['address'] = $addressDetails[0]['display']; + } } if ($this->_component == 'contribute') { //get soft contributions