- bugfix for empty config files

- convert timestamps of registered resources to integer
This commit is contained in:
Uwe.Tews
2009-11-20 21:49:20 +00:00
parent cc4058c633
commit 631e3023cc
3 changed files with 7 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
11/20/2009
- bugfix for empty config files
- convert timestamps of registered resources to integer
11/19/2009
- compiled templates are no longer touched with the filemtime of template source

View File

@@ -41,7 +41,7 @@ class Smarty_Internal_Config_File_Compiler {
then written to compiled files. */
$this->config = $config;
// get config file source
$_content = $config->getConfigSource();
$_content = $config->getConfigSource()."\n";
// on empty template just return
if ($_content == '') {
return true;

View File

@@ -63,7 +63,7 @@ class Smarty_Internal_Resource_Registered {
$time_stamp = false;
call_user_func_array($this->smarty->_plugins['resource'][$_template->resource_type][0][1],
array($_template->resource_name, &$time_stamp, $this->smarty));
return $time_stamp;
return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp;
}
/**
* Get timestamp to template source by type and name
@@ -77,7 +77,7 @@ class Smarty_Internal_Resource_Registered {
$time_stamp = false;
call_user_func_array($this->smarty->_plugins['resource'][$_resource_type][0][1],
array($_resource_name, &$time_stamp, $this->smarty));
return $time_stamp;
return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp;
}
/**