1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-28 10:40:28 +02:00

Merge pull request #2637 from Nicofuma/ticket/12387

[ticket/12387] Cleanup *_free_result call and remove @ on that call

* Nicofuma/ticket/12387:
  [ticket/12387] Fix a call to sql_freeresult in full_text_native
  [ticket/12387] Fix \phpbb\db\driver\mysqli::sql_freeresult
  [ticket/12387] Use the hash as query_id for caching
  [ticket/12387] Remove unnecessary checks
  [ticket/12387] mssql_query return true if a select query returns 0 row
  [ticket/12387] Cleanup *_free_result call and remove @ on that call
This commit is contained in:
Joas Schilling
2014-08-07 12:09:01 +02:00
13 changed files with 261 additions and 153 deletions

View File

@@ -271,7 +271,7 @@ abstract class driver implements driver_interface
$query_id = $this->query_result;
}
if ($query_id !== false)
if ($query_id)
{
$result = array();
while ($row = $this->sql_fetchrow($query_id))
@@ -302,7 +302,7 @@ abstract class driver implements driver_interface
return $cache->sql_rowseek($rownum, $query_id);
}
if ($query_id === false)
if (!$query_id)
{
return false;
}
@@ -310,7 +310,7 @@ abstract class driver implements driver_interface
$this->sql_freeresult($query_id);
$query_id = $this->sql_query($this->last_query_text);
if ($query_id === false)
if (!$query_id)
{
return false;
}
@@ -339,7 +339,7 @@ abstract class driver implements driver_interface
$query_id = $this->query_result;
}
if ($query_id !== false)
if ($query_id)
{
if ($rownum !== false)
{