projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
96289a0
)
Do not repeat dirname function execution in writing cache files
author
glutamatt
<fatal974@hotmail.com>
Fri, 4 Oct 2013 13:40:25 +0000 (15:40 +0200)
committer
glutamatt
<fatal974@hotmail.com>
Fri, 4 Oct 2013 13:40:25 +0000 (15:40 +0200)
lib/Twig/Environment.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Environment.php
b/lib/Twig/Environment.php
index
1ea5037
..
b62a5c3
100644
(file)
--- a/
lib/Twig/Environment.php
+++ b/
lib/Twig/Environment.php
@@
-1217,7
+1217,7
@@
class Twig_Environment
throw new RuntimeException(sprintf("Unable to write in the cache directory (%s).", $dir));
}
- $tmpFile = tempnam(dirname($file), basename($file));
+ $tmpFile = tempnam($dir, basename($file));
if (false !== @file_put_contents($tmpFile, $content)) {
// rename does not work on Win32 before 5.2.6
if (@rename($tmpFile, $file) || (@copy($tmpFile, $file) && unlink($tmpFile))) {