summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/diskcache.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/diskcache.php b/classes/diskcache.php
index 6a9038289..b5c10e89d 100644
--- a/classes/diskcache.php
+++ b/classes/diskcache.php
@@ -243,8 +243,9 @@ class DiskCache implements Cache_Adapter {
return $this->adapter->make_dir();
}
+ /** @param string|null $filename null means check that cache directory itself is writable */
public function is_writable(?string $filename = null): bool {
- return $this->adapter->is_writable(basename($filename));
+ return $this->adapter->is_writable($filename ? basename($filename) : null);
}
public function exists(string $filename): bool {