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/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/driver/mysql.php') 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); } -- 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/mysql.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'phpBB/phpbb/db/driver/mysql.php') diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php index d215453ccb..e311f0dd74 100644 --- a/phpBB/phpbb/db/driver/mysql.php +++ b/phpBB/phpbb/db/driver/mysql.php @@ -9,14 +9,6 @@ namespace phpbb\db\driver; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * MySQL4 Database Abstraction Layer * Compatible with: -- cgit v1.2.1