diff --git a/Smarty.class.php b/Smarty.class.php index 5c31113a..d4650a0c 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -772,7 +772,7 @@ class Smarty if ($create_dirs) $this->_create_dir_structure(dirname($filename)); - if (!($fd = fopen($filename, 'a'))) { + if (!($fd = fopen($filename, 'w'))) { $this->_trigger_error_msg("problem writing '$filename.'"); return false; } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 5c31113a..d4650a0c 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -772,7 +772,7 @@ class Smarty if ($create_dirs) $this->_create_dir_structure(dirname($filename)); - if (!($fd = fopen($filename, 'a'))) { + if (!($fd = fopen($filename, 'w'))) { $this->_trigger_error_msg("problem writing '$filename.'"); return false; }