From: Tim Düsterhus Date: Wed, 12 Mar 2014 19:49:00 +0000 (+0100) Subject: Fix regular expression in DateUtil::validateDate() X-Git-Tag: 2.0.4~11^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=afc3ddab02a639a411912b641f31c37da4bbf7cf;p=GitHub%2FWoltLab%2FWCF.git Fix regular expression in DateUtil::validateDate() see 59351a802d94c6866a4e2d6ccb04204fcc9e199a --- 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"); }