check there is an address for contact
authorTim Mallezie <tim.mallezie@chiro.be>
Wed, 2 Sep 2015 08:42:58 +0000 (10:42 +0200)
committerdeb.monish <monish.deb@webaccessglobal.com>
Wed, 13 Apr 2016 11:45:21 +0000 (17:15 +0530)
CRM/Contribute/BAO/Contribution.php

index c0f05bcf98dbce263164174f663c0c17ca200964..f8cc5df3ef984fe955fa15239dfe43e7b80df632 100644 (file)
@@ -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