diff --git a/fp-includes/smarty-4.2.1/libs/plugins/function.html_select_date.php b/fp-includes/smarty-4.2.1/libs/plugins/function.html_select_date.php
index a396046..f9e6e2b 100644
--- a/fp-includes/smarty-4.2.1/libs/plugins/function.html_select_date.php
+++ b/fp-includes/smarty-4.2.1/libs/plugins/function.html_select_date.php
@@ -315,9 +315,11 @@ function smarty_function_html_select_date($params, Smarty_Internal_Template $tem
}
for ($i = 1; $i <= 12; $i++) {
$_val = sprintf('%02d', $i);
+ // FlatPress: replaces strftime() with strftime_replacement in order to be PHP 8.1 compatible
$_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_replacement($month_format, $_month_timestamps[ $i ]));
+ $_value = $month_value_format === '%m' ? $_val : strftime_replacement($month_value_format, $_month_timestamps[ $i ]);
+ // /FlatPress
$_html_months .= '' . $option_separator;
}
diff --git a/fp-includes/smarty-4.2.1/libs/plugins/function.html_select_date_ORIG_v4.2.1.php b/fp-includes/smarty-4.2.1/libs/plugins/function.html_select_date_ORIG_v4.2.1.php
new file mode 100644
index 0000000..a396046
--- /dev/null
+++ b/fp-includes/smarty-4.2.1/libs/plugins/function.html_select_date_ORIG_v4.2.1.php
@@ -0,0 +1,395 @@
+
+ * @author Rodney Rehm
+ *
+ * @param array $params parameters
+ *
+ * @param \Smarty_Internal_Template $template
+ *
+ * @return string
+ * @throws \SmartyException
+ */
+function smarty_function_html_select_date($params, Smarty_Internal_Template $template)
+{
+ $template->_checkPlugins(
+ array(
+ array(
+ 'function' => 'smarty_function_escape_special_chars',
+ 'file' => SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'
+ )
+ )
+ );
+ // generate timestamps used for month names only
+ static $_month_timestamps = null;
+ static $_current_year = null;
+ if ($_month_timestamps === null) {
+ $_current_year = date('Y');
+ $_month_timestamps = array();
+ for ($i = 1; $i <= 12; $i++) {
+ $_month_timestamps[ $i ] = mktime(0, 0, 0, $i, 1, 2000);
+ }
+ }
+ /* Default values. */
+ $prefix = 'Date_';
+ $start_year = null;
+ $end_year = null;
+ $display_days = true;
+ $display_months = true;
+ $display_years = true;
+ $month_format = '%B';
+ /* Write months as numbers by default GL */
+ $month_value_format = '%m';
+ $day_format = '%02d';
+ /* Write day values using this format MB */
+ $day_value_format = '%d';
+ $year_as_text = false;
+ /* Display years in reverse order? Ie. 2000,1999,.... */
+ $reverse_years = false;
+ /* Should the select boxes be part of an array when returned from PHP?
+ e.g. setting it to "birthday", would create "birthday[Day]",
+ "birthday[Month]" & "birthday[Year]". Can be combined with prefix */
+ $field_array = null;
+ /*