diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-10-15 15:39:12 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-10-15 15:39:12 +0200 |
commit | 8dc824d4b363ee21bad3b6a7f53fa57b73763a52 (patch) | |
tree | f647755f3e2323a4fab351edaa3c60d641183946 /phpBB/phpbb/db | |
parent | 7a46976a785bd2a89004ecdce69662b2ece2ed4d (diff) | |
parent | 76ddf1ca4143f38f3bf8fc6aabdb3fa302d6ed40 (diff) | |
download | forums-8dc824d4b363ee21bad3b6a7f53fa57b73763a52.tar forums-8dc824d4b363ee21bad3b6a7f53fa57b73763a52.tar.gz forums-8dc824d4b363ee21bad3b6a7f53fa57b73763a52.tar.bz2 forums-8dc824d4b363ee21bad3b6a7f53fa57b73763a52.tar.xz forums-8dc824d4b363ee21bad3b6a7f53fa57b73763a52.zip |
Merge remote-tracking branch 'noxwizard/ticket/11918' into prep-release-3.1.0-a1
* noxwizard/ticket/11918:
[ticket/11918] Make sql_freeresult() consistent across all DB drivers
Diffstat (limited to 'phpBB/phpbb/db')
-rw-r--r-- | phpBB/phpbb/db/driver/firebird.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mssql.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mssql_odbc.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mssqlnative.php | 3 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mysql.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/oracle.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/postgres.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/sqlite.php | 2 |
8 files changed, 11 insertions, 10 deletions
diff --git a/phpBB/phpbb/db/driver/firebird.php b/phpBB/phpbb/db/driver/firebird.php index 2df5eaf369..aef75eab15 100644 --- a/phpBB/phpbb/db/driver/firebird.php +++ b/phpBB/phpbb/db/driver/firebird.php @@ -398,7 +398,7 @@ class firebird extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php index 4d2cd287da..50096deded 100644 --- a/phpBB/phpbb/db/driver/mssql.php +++ b/phpBB/phpbb/db/driver/mssql.php @@ -318,14 +318,14 @@ class mssql extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } - if (isset($this->open_queries[$query_id])) + if (isset($this->open_queries[(int) $query_id])) { - unset($this->open_queries[$query_id]); + unset($this->open_queries[(int) $query_id]); return @mssql_free_result($query_id); } diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php index 9db34a69fb..b9881035c0 100644 --- a/phpBB/phpbb/db/driver/mssql_odbc.php +++ b/phpBB/phpbb/db/driver/mssql_odbc.php @@ -305,7 +305,7 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php index e6002fe1a3..aade311bcb 100644 --- a/phpBB/phpbb/db/driver/mssqlnative.php +++ b/phpBB/phpbb/db/driver/mssqlnative.php @@ -471,7 +471,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base $query_id = $this->query_result; } - if ($cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } @@ -481,6 +481,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base unset($this->open_queries[(int) $query_id]); return @sqlsrv_free_stmt($query_id); } + return false; } diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php index c76126763d..d215453ccb 100644 --- a/phpBB/phpbb/db/driver/mysql.php +++ b/phpBB/phpbb/db/driver/mysql.php @@ -289,7 +289,7 @@ class mysql extends \phpbb\db\driver\mysql_base $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php index 5dfab21455..4fba654d1e 100644 --- a/phpBB/phpbb/db/driver/oracle.php +++ b/phpBB/phpbb/db/driver/oracle.php @@ -621,7 +621,7 @@ class oracle extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php index 7a98b90c73..9cbb1ecb07 100644 --- a/phpBB/phpbb/db/driver/postgres.php +++ b/phpBB/phpbb/db/driver/postgres.php @@ -350,7 +350,7 @@ class postgres extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php index a548fd2618..55a33284f2 100644 --- a/phpBB/phpbb/db/driver/sqlite.php +++ b/phpBB/phpbb/db/driver/sqlite.php @@ -261,7 +261,7 @@ class sqlite extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } |