diff options
Diffstat (limited to 'phpBB/includes/db/driver/mssql_odbc.php')
-rw-r--r-- | phpBB/includes/db/driver/mssql_odbc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/db/driver/mssql_odbc.php b/phpBB/includes/db/driver/mssql_odbc.php index 7d93f939a2..f7834443eb 100644 --- a/phpBB/includes/db/driver/mssql_odbc.php +++ b/phpBB/includes/db/driver/mssql_odbc.php @@ -179,7 +179,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver } $this->last_query_text = $query; - $this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false; + $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false; $this->sql_add_num_queries($this->query_result); if ($this->query_result === false) @@ -194,7 +194,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver $this->sql_report('stop', $query); } - if ($cache_ttl) + if ($cache && $cache_ttl) { $this->open_queries[(int) $this->query_result] = $this->query_result; $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl); @@ -270,7 +270,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver $query_id = $this->query_result; } - if ($cache->sql_exists($query_id)) + if ($cache && $cache->sql_exists($query_id)) { return $cache->sql_fetchrow($query_id); } @@ -311,7 +311,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver $query_id = $this->query_result; } - if ($cache->sql_exists($query_id)) + if ($cache && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } |