Avoid warnings in case cache dir is explicitly directed to /dev/null, fixes #5468

main
Jordi Boggiano 8 years ago
parent ebae5dfd95
commit fd6455218e

@ -44,6 +44,11 @@ class Cache
$this->whitelist = $whitelist;
$this->filesystem = $filesystem ?: new Filesystem();
if (preg_match('{(^|[\\\\/])(\$null|NUL|/dev/null)([\\\\/]|$)}', $cacheDir)) {
$this->enabled = false;
return;
}
if (
(!is_dir($this->root) && !Silencer::call('mkdir', $this->root, 0777, true))
|| !is_writable($this->root)

Loading…
Cancel
Save