diff options
Diffstat (limited to 'phpBB/includes/db/driver/mysql.php')
| -rw-r--r-- | phpBB/includes/db/driver/mysql.php | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/phpBB/includes/db/driver/mysql.php b/phpBB/includes/db/driver/mysql.php index 30f78c9231..9de7283a42 100644 --- a/phpBB/includes/db/driver/mysql.php +++ b/phpBB/includes/db/driver/mysql.php @@ -188,7 +188,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver  				$this->sql_report('start', $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) @@ -203,7 +203,7 @@ class phpbb_db_driver_mysql 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); @@ -265,7 +265,7 @@ class phpbb_db_driver_mysql 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);  		} @@ -286,7 +286,7 @@ class phpbb_db_driver_mysql 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_rowseek($rownum, $query_id);  		} @@ -314,7 +314,7 @@ class phpbb_db_driver_mysql 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);  		} | 
