mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 10:56:38 +00:00
!empty($date[0]) → !empty($date)
This commit is contained in:
@@ -238,7 +238,7 @@ function twig_date_format_filter($date, $format = 'F j, Y H:i', $timezone = null
|
||||
{
|
||||
if (!$date instanceof DateTime && !$date instanceof DateInterval) {
|
||||
if (ctype_digit((string) $date)
|
||||
|| (!empty($date[0])
|
||||
|| (!empty($date)
|
||||
&& ('-' === $date[0])
|
||||
&& ctype_digit(substr($date, 1)))
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user