Skip to content

Commit

Permalink
!empty($date[0]) → !empty($date)
Browse files Browse the repository at this point in the history
  • Loading branch information
shvchk committed Nov 20, 2011
1 parent 0182dbc commit 5f30db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Twig/Extension/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
) {
Expand Down

0 comments on commit 5f30db0

Please sign in to comment.