From c8828473a85a061889f58e900036ddb90f38652c Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 10 Jun 2011 18:37:29 +0200 Subject: [PATCH] [ticket/9992] Use sql_fetchfield for single row and single column result PHPBB3-9992 --- phpBB/includes/auth/auth_db.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index e155130e04..02c9386f33 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -85,9 +85,8 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for } $result = $db->sql_query($sql); - $attempts_row = $db->sql_fetchrow($result); + $attempts = (int) $db->sql_fetchfield('count'); $db->sql_freeresult($result); - $attempts = $attempts_row['count']; $attempt_data = array( 'attempt_ip' => $ip,