Merge branch 'JohnFF-patch-1'
[civicrm-core.git] / CRM / Contribute / Form / SoftCredit.php
index 59f893aed0becbba8ba9257b32b3bc3741ba5611..b8145f7898ea4cbb1cb80bfb88c582052f73e04b 100644 (file)
@@ -106,7 +106,7 @@ class CRM_Contribute_Form_SoftCredit {
     if ($form->getAction() & CRM_Core_Action::UPDATE) {
       $form->_softCreditInfo = CRM_Contribute_BAO_ContributionSoft::getSoftContribution($form->_id, TRUE);
     }
-    elseif ($form->_pledgeID) {
+    elseif (!empty($form->_pledgeID)) {
       //Check and select most recent completed contrubtion and use it to retrieve
       //soft-credit information to use as default for current pledge payment, CRM-13981
       $pledgePayments = CRM_Pledge_BAO_PledgePayment::getPledgePayments($form->_pledgeID);
@@ -196,7 +196,7 @@ class CRM_Contribute_Form_SoftCredit {
    * @param $errors
    * @param $self
    *
-   * @return true if no errors, else array of errors
+   * @return array of errors
    * @access public
    * @static
    */