diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php index 18c149459..492d5eb25 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php @@ -29,7 +29,6 @@ class Smarty_Internal_Runtime_WriteFile { $_error_reporting = error_reporting(); error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING); - $old_umask = umask(0); $_dirpath = dirname($_filepath); // if subdirs, create dir structure if ($_dirpath !== '.') { @@ -37,7 +36,7 @@ class Smarty_Internal_Runtime_WriteFile // loop if concurrency problem occurs // see https://bugs.php.net/bug.php?id=35326 while (!is_dir($_dirpath)) { - if (@mkdir($_dirpath, 0771, true)) { + if (@mkdir($_dirpath, 0777, true)) { break; } clearstatcache(); @@ -85,8 +84,7 @@ class Smarty_Internal_Runtime_WriteFile throw new SmartyException("unable to write file {$_filepath}"); } // set file permissions - chmod($_filepath, 0644); - umask($old_umask); + @chmod($_filepath, 0666 & ~umask()); error_reporting($_error_reporting); return true; } |