Deprecation fix for providing a non string value to ctype_digit (#960)

This commit is contained in:
Wim Wisselink
2024-03-27 11:48:38 +01:00
committed by GitHub
parent 28e11b114b
commit a58d869502

View File

@@ -66,7 +66,7 @@ function smarty_make_timestamp($string)
|| (interface_exists('DateTimeInterface', false) && $string instanceof DateTimeInterface)
) {
return (int)$string->format('U'); // PHP 5.2 BC
} elseif (strlen($string) === 14 && ctype_digit($string)) {
} elseif (strlen($string) === 14 && ctype_digit((string)$string)) {
// it is mysql timestamp format of YYYYMMDDHHMMSS?
return mktime(
substr($string, 8, 2),