CRM-16259-8 Removed while since only one row is present
authorEdsel <edsel.lopez@jmaconsulting.biz>
Thu, 28 Jan 2016 10:37:04 +0000 (16:07 +0530)
committerEdsel <edsel.lopez@jmaconsulting.biz>
Tue, 16 Feb 2016 07:29:16 +0000 (12:59 +0530)
CRM/Contribute/BAO/Contribution.php

index b00e0c9f1e1c9645044b8f00787deb37d1e7ce67..226ad14d7ed872e2a8f284670dcaf05bfea4e0da 100644 (file)
@@ -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()) {