mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +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:
@@ -147,6 +147,11 @@ class sqlite3 extends \phpbb\db\driver\driver
|
||||
$this->sql_time += microtime(true) - $this->curtime;
|
||||
}
|
||||
|
||||
if (!$this->query_result)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
@@ -371,9 +376,12 @@ class sqlite3 extends \phpbb\db\driver\driver
|
||||
$endtime = $endtime[0] + $endtime[1];
|
||||
|
||||
$result = $this->dbo->query($query);
|
||||
while ($void = $result->fetchArray(SQLITE3_ASSOC))
|
||||
if ($result)
|
||||
{
|
||||
// Take the time spent on parsing rows into account
|
||||
while ($void = $result->fetchArray(SQLITE3_ASSOC))
|
||||
{
|
||||
// Take the time spent on parsing rows into account
|
||||
}
|
||||
}
|
||||
|
||||
$splittime = explode(' ', microtime());
|
||||
|
Reference in New Issue
Block a user