mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-19 00:49:30 +01:00
Silence deprecation errors for strtime in PHP8.1 or higher
Fixes #672 (#811)
This commit is contained in:
@@ -316,8 +316,8 @@ function smarty_function_html_select_date($params, Smarty_Internal_Template $tem
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$_val = sprintf('%02d', $i);
|
||||
$_text = isset($month_names) ? smarty_function_escape_special_chars($month_names[ $i ]) :
|
||||
($month_format === '%m' ? $_val : strftime($month_format, $_month_timestamps[ $i ]));
|
||||
$_value = $month_value_format === '%m' ? $_val : strftime($month_value_format, $_month_timestamps[ $i ]);
|
||||
($month_format === '%m' ? $_val : @strftime($month_format, $_month_timestamps[ $i ]));
|
||||
$_value = $month_value_format === '%m' ? $_val : @strftime($month_value_format, $_month_timestamps[ $i ]);
|
||||
$_html_months .= '<option value="' . $_value . '"' . ($_val == $_month ? ' selected="selected"' : '') .
|
||||
'>' . $_text . '</option>' . $option_separator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user