IniWriter: Do not use umask(0)
chmod is not affected in any way by the umask.
This commit is contained in:
parent
f84a9a6529
commit
fbe252063b
|
@ -90,11 +90,9 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
|
||||||
|
|
||||||
if ($setMode) {
|
if ($setMode) {
|
||||||
$mode = isset($this->options['filemode']) ? $this->options['filemode'] : static::$fileMode;
|
$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)) {
|
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));
|
throw new Zend_Config_Exception(sprintf('Failed to set file mode "%o" on file "%s"', $mode, $filePath));
|
||||||
}
|
}
|
||||||
umask($old);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue