Skip to content

Commit

Permalink
use cache dir for temporary files to avoid ACL issues
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed Aug 27, 2013
1 parent 2b95de3 commit 0af8423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Metadata/Cache/FileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function putClassMetadataInCache(ClassMetadata $metadata)
{
$path = $this->dir.'/'.strtr($metadata->name, '\\', '-').'.cache.php';

$tmpFile = tempnam(sys_get_temp_dir(), 'metadata-cache');
$tmpFile = tempnam($this->dir, 'metadata-cache');
file_put_contents($tmpFile, '<?php return unserialize('.var_export(serialize($metadata), true).');');

if (false === @rename($tmpFile, $path)) {
Expand Down

0 comments on commit 0af8423

Please sign in to comment.