From 23a08351f43edf6d07ffdd0896202ae12dbc19f2 Mon Sep 17 00:00:00 2001 From: Atanamo Date: Mon, 14 Mar 2022 13:18:29 +0100 Subject: [PATCH] PHP 8.1: Replaced deprecated strftime() for template compile date --- libs/Smarty_Compiler.class.php | 2 +- libs/internals/core.write_compiled_include.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index e6fe41299..3646e04ab 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -391,7 +391,7 @@ function _compile_file($resource_name, $source_content, &$compiled_content) } // put header at the top of the compiled template - $template_header = "_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; + $template_header = "_version.", created on ".date("Y-m-d H:i:s")."\n"; $template_header .= " compiled from ".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))." */ ?>\n"; /* Emit code to load needed plugins. */ diff --git a/libs/internals/core.write_compiled_include.php b/libs/internals/core.write_compiled_include.php index c14adb5f4..c122d968f 100644 --- a/libs/internals/core.write_compiled_include.php +++ b/libs/internals/core.write_compiled_include.php @@ -25,7 +25,7 @@ function smarty_core_write_compiled_include($params, &$smarty) if (count($_match_source)==0) return; // convert the matched php-code to functions - $_include_compiled = "_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; + $_include_compiled = "_version.", created on ".date("Y-m-d H:i:s")."\n"; $_include_compiled .= " compiled from " . strtr(urlencode($params['resource_name']), array('%2F'=>'/', '%3A'=>':')) . " */\n\n"; $_compile_path = $params['include_file_path'];