Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handle cached empty results in Query::execute(). Fixes #4032

  • Loading branch information...
commit e353340975ac21c5b7ffb2a25f31a052b03fce0f 1 parent 27d8ba4
@cbandy cbandy authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  classes/kohana/database/query.php
View
2  classes/kohana/database/query.php
@@ -214,7 +214,7 @@ public function execute($db = NULL)
// Set the cache key based on the database instance name and SQL
$cache_key = 'Database::query("'.$db.'", "'.$sql.'")';
- if ($result = Kohana::cache($cache_key, NULL, $this->_lifetime))
+ if (($result = Kohana::cache($cache_key, NULL, $this->_lifetime)) !== NULL)
{
// Return a cached result
return new Database_Result_Cached($result, $sql, $this->_as_object, $this->_object_params);
Please sign in to comment.
Something went wrong with that request. Please try again.