From 76ddf1ca4143f38f3bf8fc6aabdb3fa302d6ed40 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Mon, 14 Oct 2013 16:37:23 -0500 Subject: [ticket/11918] Make sql_freeresult() consistent across all DB drivers PHPBB3-11918 --- phpBB/phpbb/db/driver/mssql.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/phpbb/db/driver/mssql.php') 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); } -- cgit v1.2.1 From 7f58a4572eaca75aecff2da889e67ea151616011 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 28 Oct 2013 22:27:25 +0100 Subject: [ticket/11981] Fix code sniffer complaints PHPBB3-11981 --- phpBB/phpbb/db/driver/mssql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/driver/mssql.php') diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php index 50096deded..e1b41461e2 100644 --- a/phpBB/phpbb/db/driver/mssql.php +++ b/phpBB/phpbb/db/driver/mssql.php @@ -259,7 +259,7 @@ class mssql extends \phpbb\db\driver\driver { foreach ($row as $key => $value) { - $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value; + $row[$key] = ($value === ' ' || $value === null) ? '' : $value; } } -- cgit v1.2.1 From 7aa8f6461f1e85cf91931f56b95384e54fec07c2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 30 Oct 2013 13:05:28 +0100 Subject: [task/code-sniffer] Remove the IN_PHPBB check side-effect from class files. PHPBB3-11980 --- phpBB/phpbb/db/driver/mssql.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'phpBB/phpbb/db/driver/mssql.php') diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php index e1b41461e2..6ebc891673 100644 --- a/phpBB/phpbb/db/driver/mssql.php +++ b/phpBB/phpbb/db/driver/mssql.php @@ -9,14 +9,6 @@ namespace phpbb\db\driver; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * MSSQL Database Abstraction Layer * Minimum Requirement is MSSQL 2000+ -- cgit v1.2.1