From 1f2cb69c8aeedf8cb388fdbce366b0e2e356332a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 3 Feb 2015 18:23:13 +0100 Subject: [ticket/13348] Use close method to free query result handle PHPBB3-13348 --- phpBB/feed.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/phpBB/feed.php b/phpBB/feed.php index 9816f0f303..775fdf7230 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -464,6 +464,9 @@ class phpbb_feed_base */ var $separator_stats = "\xE2\x80\x94"; // — + /** @var mixed Query result handle */ + var $result; + /** * Constructor */ @@ -618,9 +621,8 @@ class phpbb_feed_base function get_item() { global $db, $cache; - static $result; - if (!isset($result)) + if (!isset($this->result)) { if (!$this->get_sql()) { @@ -629,10 +631,10 @@ class phpbb_feed_base // Query database $sql = $db->sql_build_query('SELECT', $this->sql); - $result = $db->sql_query_limit($sql, $this->num_items); + $this->result = $db->sql_query_limit($sql, $this->num_items); } - return $db->sql_fetchrow($result); + return $db->sql_fetchrow($this->result); } function user_viewprofile($row) -- cgit v1.2.1