mirror of
https://github.com/symfony/class-loader.git
synced 2026-03-24 17:22:11 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0152f7a47a | ||
|
|
1c67601ae9 | ||
|
|
7c46951128 | ||
|
|
1108382429 | ||
|
|
f0ecf2161f | ||
|
|
96b69c7817 | ||
|
|
4332e482b5 | ||
|
|
2e19afbcc7 | ||
|
|
d31a6b4c5c |
@@ -299,7 +299,13 @@ REGEX;
|
||||
*/
|
||||
private static function writeCacheFile($file, $content)
|
||||
{
|
||||
$tmpFile = tempnam(dirname($file), basename($file));
|
||||
$dir = dirname($file);
|
||||
if (!is_writable($dir)) {
|
||||
throw new \RuntimeException(sprintf('Cache directory "%s" is not writable.', $dir));
|
||||
}
|
||||
|
||||
$tmpFile = tempnam($dir, basename($file));
|
||||
|
||||
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
|
||||
@chmod($file, 0666 & ~umask());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user