mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-02 17:34:26 +02:00
Deprecation fix for providing a non string value to ctype_digit (#960)
This commit is contained in:
@@ -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),
|
||||
|
Reference in New Issue
Block a user