You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) {
41
+
thrownewInvalidArgumentException(sprintf('Cache namespace for filesystem cache contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
42
+
}
43
+
$directory .= '/'.$namespace;
44
+
}
45
+
if (isset($version[0])) {
46
+
if (preg_match('#[^-+_.A-Za-z0-9]#', $version, $match)) {
47
+
thrownewInvalidArgumentException(sprintf('Cache version contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
48
+
}
49
+
$directory .= '/'.$version;
50
+
}
51
+
if (!file_exists($dir = $directory.'/.')) {
52
+
@mkdir($directory, 0777, true);
53
+
}
54
+
if (false === $dir = realpath($dir)) {
55
+
thrownewInvalidArgumentException(sprintf('Cache directory does not exist (%s)', $directory));
56
+
}
57
+
if (!is_writable($dir .= DIRECTORY_SEPARATOR)) {
58
+
thrownewInvalidArgumentException(sprintf('Cache directory is not writable (%s)', $directory));
59
+
}
60
+
// On Windows the whole path is limited to 258 chars
0 commit comments