diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 7560570e82..356c8bdb74 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -124,7 +124,6 @@ function auth($type, $forum_id, $userdata, $f_access = '') { message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); } - $db->sql_freeresult($result); $sql_fetchrow = ( $forum_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; @@ -133,7 +132,6 @@ function auth($type, $forum_id, $userdata, $f_access = '') $db->sql_freeresult($result); return array(); } - $db->sql_freeresult($result); } @@ -157,7 +155,6 @@ function auth($type, $forum_id, $userdata, $f_access = '') { message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); } - $db->sql_freeresult($result); if ( $row = $db->sql_fetchrow($result) ) { @@ -174,6 +171,7 @@ function auth($type, $forum_id, $userdata, $f_access = '') } while( $row = $db->sql_fetchrow($result) ); } + $db->sql_freeresult($result); } $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0; diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php index 3d97604138..1eb9050e38 100644 --- a/phpBB/includes/page_header.php +++ b/phpBB/includes/page_header.php @@ -106,7 +106,6 @@ if (defined('SHOW_ONLINE')) { message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql); } - $db->sql_freeresult($result); $userlist_ary = array(); $userlist_visible = array();