From 5f30db0f4140666378736853f6a243d8ea8dda1d Mon Sep 17 00:00:00 2001 From: Andrei Shevchuk Date: Sun, 20 Nov 2011 21:39:44 +0400 Subject: [PATCH] =?utf8?q?!empty($date[0])=20=E2=86=92=20!empty($date)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/Twig/Extension/Core.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 11a0ee4..215ec6f 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -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))) ) { -- 1.7.2.5