mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
- bugfix Smarty version was not filled in header comment of compiled and cached files
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== 3.1.32 - dev ===
|
||||
26.10.2017 3.1.32-dev-28
|
||||
- bugfix Smarty version was not filled in header comment of compiled and cached files
|
||||
|
||||
21.10.2017
|
||||
- bugfix custom delimiters could fail since modification of version 3.1.32-dev-23
|
||||
https://github.com/smarty-php/smarty/issues/394
|
||||
|
@@ -6,7 +6,6 @@
|
||||
* @subpackage PluginsInternal
|
||||
* @author Monte Ohrt
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty Internal Write File Class
|
||||
*
|
||||
@@ -35,9 +34,7 @@ class Smarty_Internal_Runtime_WriteFile
|
||||
if ($_file_perms !== null) {
|
||||
$old_umask = umask(0);
|
||||
}
|
||||
|
||||
$_dirpath = dirname($_filepath);
|
||||
|
||||
// if subdirs, create dir structure
|
||||
if ($_dirpath !== '.') {
|
||||
$i = 0;
|
||||
@@ -55,14 +52,12 @@ class Smarty_Internal_Runtime_WriteFile
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
// write to tmp file, then move to overt file lock race condition
|
||||
$_tmp_file = $_dirpath . $smarty->ds . str_replace(array('.', ','), '_', uniqid('wrt', true));
|
||||
$_tmp_file = $_dirpath . DIRECTORY_SEPARATOR . 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,
|
||||
* Linux' rename() properly handles the overwrite.
|
||||
@@ -99,7 +94,6 @@ class Smarty_Internal_Runtime_WriteFile
|
||||
umask($old_umask);
|
||||
}
|
||||
error_reporting($_error_reporting);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user