From afc3ddab02a639a411912b641f31c37da4bbf7cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 12 Mar 2014 20:49:00 +0100 Subject: [PATCH] Fix regular expression in DateUtil::validateDate() see 59351a802d94c6866a4e2d6ccb04204fcc9e199a --- wcfsetup/install/files/lib/util/DateUtil.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/DateUtil.class.php b/wcfsetup/install/files/lib/util/DateUtil.class.php index 6caf8359ed..7f8b6930cc 100644 --- a/wcfsetup/install/files/lib/util/DateUtil.class.php +++ b/wcfsetup/install/files/lib/util/DateUtil.class.php @@ -357,7 +357,7 @@ final class DateUtil { * @param string $date */ public static function validateDate($date) { - if (preg_match('~^(?[0-9]{4})-(?[0-9]{2})-(?[0-9]{2})~', $date, $matches)) { + if (preg_match('~^(?P[0-9]{4})-(?P[0-9]{2})-(?P[0-9]{2})~', $date, $matches)) { if (!checkdate($matches['month'], $matches['day'], $matches['year'])) { throw new SystemException("Date '".$date."' is invalid"); } -- 2.20.1