mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 04:20:32 +02:00
[ticket/10875] Changes to Cache Driver caused method_exists checks to fail
SQL Cache and other functions using the check method_exists($cache, failed because of the changes to the cache system. method_exists($cache has been changed to method_exists($cache->get_driver() PHPBB3-10875
This commit is contained in:
@@ -200,7 +200,7 @@ class dbal_postgres extends dbal
|
||||
}
|
||||
|
||||
$this->last_query_text = $query;
|
||||
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache_ttl && method_exists($cache->get_driver(), 'sql_load')) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
@@ -215,7 +215,7 @@ class dbal_postgres extends dbal
|
||||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl && method_exists($cache, 'sql_save'))
|
||||
if ($cache_ttl && method_exists($cache->get_driver(), 'sql_save'))
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
|
Reference in New Issue
Block a user