}
if ($this->debug
- && (false !== $filename = $class->getFilename())
+ && (false !== $filename = $class->getFileName())
&& filemtime($path) < filemtime($filename)) {
@unlink($path);
throw new \RuntimeException(sprintf('Unable to create tempfile in directory: %s', $this->dir));
}
+ @chmod($tempfile, 0666 & (~$this->umask));
+
$written = file_put_contents($tempfile, '<?php return unserialize('.var_export(serialize($data), true).');');
if (false === $written) {