mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge remote-tracking branch 'noxwizard/ticket/11918' into prep-release-3.1.0-a1
* noxwizard/ticket/11918: [ticket/11918] Make sql_freeresult() consistent across all DB drivers
This commit is contained in:
commit
8dc824d4b3
8 changed files with 11 additions and 10 deletions
|
@ -398,7 +398,7 @@ class firebird extends \phpbb\db\driver\driver
|
||||||
$query_id = $this->query_result;
|
$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);
|
return $cache->sql_freeresult($query_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,14 +318,14 @@ class mssql extends \phpbb\db\driver\driver
|
||||||
$query_id = $this->query_result;
|
$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);
|
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);
|
return @mssql_free_result($query_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base
|
||||||
$query_id = $this->query_result;
|
$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);
|
return $cache->sql_freeresult($query_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,7 +471,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
|
||||||
$query_id = $this->query_result;
|
$query_id = $this->query_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cache->sql_exists($query_id))
|
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
|
||||||
{
|
{
|
||||||
return $cache->sql_freeresult($query_id);
|
return $cache->sql_freeresult($query_id);
|
||||||
}
|
}
|
||||||
|
@ -481,6 +481,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
|
||||||
unset($this->open_queries[(int) $query_id]);
|
unset($this->open_queries[(int) $query_id]);
|
||||||
return @sqlsrv_free_stmt($query_id);
|
return @sqlsrv_free_stmt($query_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ class mysql extends \phpbb\db\driver\mysql_base
|
||||||
$query_id = $this->query_result;
|
$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);
|
return $cache->sql_freeresult($query_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -621,7 +621,7 @@ class oracle extends \phpbb\db\driver\driver
|
||||||
$query_id = $this->query_result;
|
$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);
|
return $cache->sql_freeresult($query_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -350,7 +350,7 @@ class postgres extends \phpbb\db\driver\driver
|
||||||
$query_id = $this->query_result;
|
$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);
|
return $cache->sql_freeresult($query_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,7 @@ class sqlite extends \phpbb\db\driver\driver
|
||||||
$query_id = $this->query_result;
|
$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);
|
return $cache->sql_freeresult($query_id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue