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 authored and wisskid committed Mar 27, 2024
1 parent 3f871f9 commit 30b1c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
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 30b1c5b

Please sign in to comment.