mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-06 08:43:31 +02:00
Update Smarty to 3.1.3
This commit is contained in:
@@ -30,7 +30,8 @@ class Smarty_Internal_Runtime_WriteFile
|
||||
$_error_reporting = error_reporting();
|
||||
error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING);
|
||||
$_file_perms = property_exists($smarty, '_file_perms') ? $smarty->_file_perms : 0644;
|
||||
$_dir_perms = property_exists($smarty, '_dir_perms') ? (isset($smarty->_dir_perms) ? $smarty->_dir_perms : 0777) : 0771;
|
||||
$_dir_perms =
|
||||
property_exists($smarty, '_dir_perms') ? (isset($smarty->_dir_perms) ? $smarty->_dir_perms : 0777) : 0771;
|
||||
if ($_file_perms !== null) {
|
||||
$old_umask = umask(0);
|
||||
}
|
||||
@@ -42,11 +43,11 @@ class Smarty_Internal_Runtime_WriteFile
|
||||
}
|
||||
|
||||
// write to tmp file, then move to overt file lock race condition
|
||||
$_tmp_file = $_dirpath . DS . str_replace(array('.', ','), '_', uniqid('wrt', true));
|
||||
$_tmp_file = $_dirpath . $smarty->ds . str_replace(array('.', ','), '_', uniqid('wrt', true));
|
||||
if (!file_put_contents($_tmp_file, $_contents)) {
|
||||
error_reporting($_error_reporting);
|
||||
throw new SmartyException("unable to write file {$_tmp_file}");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Windows' rename() fails if the destination exists,
|
||||
|
||||
Reference in New Issue
Block a user