return null when a cache variable is not set

This commit is contained in:
Robin Appelman 2012-06-05 19:33:15 +02:00
parent dcf1eed816
commit 10eef49c3c
1 changed files with 3 additions and 3 deletions

6
lib/cache/file.php vendored
View File

@ -7,7 +7,7 @@
*/ */
class OC_Cache_File { class OC_Cache_File extends OC_Cache {
protected function getStorage() { protected function getStorage() {
if(OC_User::isLoggedIn()){ if(OC_User::isLoggedIn()){
$subdir = 'cache'; $subdir = 'cache';
@ -28,11 +28,11 @@ class OC_Cache_File {
$mtime = $storage->filemtime($key); $mtime = $storage->filemtime($key);
if ($mtime < time()) { if ($mtime < time()) {
$storage->unlink($key); $storage->unlink($key);
return false; return null;
} }
return $storage->file_get_contents($key); return $storage->file_get_contents($key);
} }
return false; return null;
} }
public function set($key, $value, $ttl) { public function set($key, $value, $ttl) {