Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13348

sql_freeresult() should be called in feed base class

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.13-PL1, 3.1.1
    • Fix Version/s: 3.0.14-RC1, 3.1.4-RC1
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: