From 2a21b19d578633f839c5b59313642c1f7f8ca182 Mon Sep 17 00:00:00 2001 From: Edsel Date: Thu, 28 Jan 2016 16:07:04 +0530 Subject: [PATCH] CRM-16259-8 Removed while since only one row is present --- CRM/Contribute/BAO/Contribution.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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()) { -- 2.25.1