Commit 621ec02e authored by Steven Wittens's avatar Steven Wittens

Fixing a faulty check in cache_get() which prevented empty data from being...

Fixing a faulty check in cache_get() which prevented empty data from being returned. This was required for filtercache, where a cache entry with empty data can have meaning (e.g. as the output for the input '<script></script>' when script is not allowed).
parent d5e1e83e
......@@ -104,7 +104,7 @@ function variable_del($name) {
*/
function cache_get($key) {
$cache = db_fetch_object(db_query("SELECT data, created, headers FROM {cache} WHERE cid = '%s'", $key));
return $cache->data ? $cache : 0;
return isset($cache->data) ? $cache : 0;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment