mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 04:04:12 +02:00
[ticket/11305] Check for $cache being null before using it in db drivers.
There is no reason why db drivers must have a cache to work. They query the database, that part works without caches. PHPBB3-11305
This commit is contained in:
@@ -206,7 +206,7 @@ class phpbb_db_driver
|
||||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
@@ -256,7 +256,7 @@ class phpbb_db_driver
|
||||
$this->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
||||
if (!is_object($query_id) && $cache->sql_exists($query_id))
|
||||
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchfield($query_id, $field);
|
||||
}
|
||||
|
Reference in New Issue
Block a user