From: Edsel Date: Thu, 28 Jan 2016 10:37:04 +0000 (+0530) Subject: CRM-16259-8 Removed while since only one row is present X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2a21b19d578633f839c5b59313642c1f7f8ca182;p=civicrm-core.git CRM-16259-8 Removed while since only one row is present --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index b00e0c9f1e..226ad14d7e 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4792,10 +4792,10 @@ LIMIT 1;"; continue; } $ftDao = CRM_Core_DAO::executeQuery($ftSql, array(1 => array($contribution->id, 'Integer'))); - while ($ftDao->fetch()) { - $trxnAmount = $ftDao->total_amount; - $ftId = $ftDao->id; - } + $ftDao->fetch(); + $trxnAmount = $ftDao->total_amount; + $ftId = $ftDao->id; + // get financial item $dao = CRM_Core_DAO::executeQuery($sql, array(1 => array($contribution->id, 'Integer'))); while ($dao->fetch()) {