From 7e28be59684bf391c1cc58c480f7ed7dfba0f093 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 21 Aug 2008 14:19:42 +0000 Subject: close db connection before delivering file. Also make sure connection can't be closed twice. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8772 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/dbal.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index e55a565ea4..6bec685061 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -138,7 +138,13 @@ class dbal $this->sql_freeresult($query_id); } - return $this->_sql_close(); + // Connection closed correctly. Set db_connect_id to false to prevent errors + if (($result = $this->_sql_close())) + { + $this->db_connect_id = false; + } + + return $result; } /** -- cgit v1.2.1