Skip to content

Commit 4ec6e6d

Browse files
committed
[Config] Little tweak
1 parent dec0722 commit 4ec6e6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ConfigCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function write($content, array $metadata = null)
9999
throw new \RuntimeException(sprintf('Unable to write in the %s directory', $dir));
100100
}
101101

102-
$tmpFile = tempnam(dirname($this->file), basename($this->file));
102+
$tmpFile = tempnam($dir, basename($this->file));
103103
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $this->file)) {
104104
@chmod($this->file, 0666 & ~umask());
105105
} else {
@@ -108,7 +108,7 @@ public function write($content, array $metadata = null)
108108

109109
if (null !== $metadata && true === $this->debug) {
110110
$file = $this->file.'.meta';
111-
$tmpFile = tempnam(dirname($file), basename($file));
111+
$tmpFile = tempnam($dir, basename($file));
112112
if (false !== @file_put_contents($tmpFile, serialize($metadata)) && @rename($tmpFile, $file)) {
113113
@chmod($file, 0666 & ~umask());
114114
}

0 commit comments

Comments
 (0)