[svn-commits] jpeeler: mantis/trunk r58 - /mantis/trunk/karma_transactions.php

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jan 29 13:45:20 CST 2009


Author: jpeeler
Date: Thu Jan 29 13:45:20 2009
New Revision: 58

URL: http://svn.digium.com/svn-view/thirdparty?view=rev&rev=58
Log:
(closes issue #13701)
Reported by: blitzrage

Can't use db_num_rows for a single result apparently.


Modified:
    mantis/trunk/karma_transactions.php

Modified: mantis/trunk/karma_transactions.php
URL: http://svn.digium.com/svn-view/thirdparty/mantis/trunk/karma_transactions.php?view=diff&rev=58&r1=57&r2=58
==============================================================================
--- mantis/trunk/karma_transactions.php (original)
+++ mantis/trunk/karma_transactions.php Thu Jan 29 13:45:20 2009
@@ -57,7 +57,8 @@
 
 			if (!db_num_rows($result2)) {
 				$result3 = db_query("SELECT SUM(value) AS karma_score FROM mantis_user_karma_transactions");
-				$f_karma_score = ((db_num_rows($result3)) ? $result3["karma_score"] : 0);
+				$result3 = db_result($result3);
+				$f_karma_score = $result3 ? $result3 : 0;
 				db_query("INSERT INTO mantis_user_karma_scores VALUES ($f_user_id, $f_karma_score)");
 			}
 




More information about the svn-commits mailing list