Skip to content

Commit

Permalink
Deprecation fix for providing a non string value to ctype_digit (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
Visualq committed Mar 27, 2024
1 parent 28e11b1 commit a58d869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions.php
Expand Up @@ -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),
Expand Down

0 comments on commit a58d869

Please sign in to comment.