fix basename() being passed a NULL value
This commit is contained in:
parent
adba0aa8d2
commit
83f5ab5c79
|
@ -243,8 +243,9 @@ class DiskCache implements Cache_Adapter {
|
||||||
return $this->adapter->make_dir();
|
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 {
|
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 {
|
public function exists(string $filename): bool {
|
||||||
|
|
Loading…
Reference in New Issue