Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-13348

sql_freeresult() should be called in feed base class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.14-RC1, 3.1.4-RC1
    • 3.0.13-PL1, 3.1.1
    • None
    • None

      Split from https://tracker.phpbb.com/browse/PHPBB3-13298

      phpBB/phpbb/feed/base.php

      	function get_item()
      	{
      		static $result;
       
      		if (!isset($result))
      		{
      			if (!$this->get_sql())
      			{
      				return false;
      			}
       
      			// Query database
      			$sql = $this->db->sql_build_query('SELECT', $this->sql);
      			$result = $this->db->sql_query_limit($sql, $this->num_items);
      		}
       
      		return $this->db->sql_fetchrow($result);
      	}
      

      If we free the result when we reach the end, the next call will just query the db again. So this needs a bit investigating to make sure it does not happen.

            Marc Marc
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: