IniWriter: Do not use umask(0)

chmod is not affected in any way by the umask.
This commit is contained in:
Eric Lippmann 2014-12-30 15:39:03 +01:00
parent f84a9a6529
commit fbe252063b
1 changed files with 1 additions and 3 deletions

View File

@ -90,11 +90,9 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
if ($setMode) {
$mode = isset($this->options['filemode']) ? $this->options['filemode'] : static::$fileMode;
$old = umask(0); // Make sure that the mode we're going to set doesn't get mangled
if (is_int($mode) && false === @chmod($filePath, $mode)) {
throw new Zend_Config_Exception(sprintf('Failed to set file mode "%o" on file "%s"', $mode, $filePath));
}
umask($old);
}
}
@ -234,7 +232,7 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
/**
* Getter for filename
*
*
* @return string
*/
public function getFilename()