1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

[ticket/17142] Fix DBMS+cache related PHP warnings while installing

PHPBB3-17142
This commit is contained in:
rxu
2023-06-08 00:05:48 +07:00
parent 75dcbeaa9f
commit 7adee3c50d
10 changed files with 115 additions and 57 deletions

View File

@@ -254,9 +254,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_fetchrow($query_id);
return $cache->sql_fetchrow($safe_query_id);
}
if ($query_id)
@@ -280,9 +281,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
return $cache->sql_rowseek($rownum, $safe_query_id);
}
return ($query_id) ? @mysqli_data_seek($query_id, $rownum) : false;
@@ -308,9 +310,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_freeresult($query_id);
return $cache->sql_freeresult($safe_query_id);
}
if (!$query_id)