1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 12:30:42 +02:00

[ticket/10875] method_exists check is not required, interface declares them

The changes to the cache drivers added an interface, which requires many
cache functions exist. For these, we can remove the method_exists() check

PHPBB3-10875
This commit is contained in:
Nathan Guse
2012-07-30 15:57:51 -05:00
parent 828eaecf6a
commit edcac438df
10 changed files with 19 additions and 20 deletions

View File

@@ -200,7 +200,7 @@ class dbal_postgres extends dbal
}
$this->last_query_text = $query;
$this->query_result = ($cache_ttl && method_exists($cache->get_driver(), 'sql_load')) ? $cache->sql_load($query) : false;
$this->query_result = ($cache_ttl) ? $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->get_driver(), 'sql_save'))
if ($cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl);