Commit 86935fab authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

readd is_file

parent ded8cc47
......@@ -83,7 +83,7 @@ class File {
public function hasKey($key) {
$storage = $this->getStorage();
if ($storage && $storage->isReadable($key)) {
if ($storage && $storage->is_file($key) && $storage->isReadable($key)) {
return true;
}
return false;
......
......@@ -52,7 +52,7 @@ class FileGlobal {
public function hasKey($key) {
$key = $this->fixKey($key);
$cache_dir = self::getCacheDir();
if ($cache_dir && is_readable($cache_dir.$key)) {
if ($cache_dir && is_file($cache_dir.$key) && is_readable($cache_dir.$key)) {
$mtime = filemtime($cache_dir.$key);
if ($mtime < time()) {
unlink($cache_dir.$key);
......
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