Update src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php
Fix `preg_match` to work with older PCRE.
This commit is contained in:
parent
d97829e8a8
commit
2a2c46892c
@ -160,14 +160,14 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer
|
||||
// Check which of the date parts are present in the pattern
|
||||
preg_match(
|
||||
'/(' .
|
||||
'(?<day>[djDl])|' .
|
||||
'(?<month>[FMmn])|' .
|
||||
'(?<year>[Yy])|' .
|
||||
'(?<hour>[ghGH])|' .
|
||||
'(?<minute>i)|' .
|
||||
'(?<second>s)|' .
|
||||
'(?<dayofyear>z)|' .
|
||||
'(?<timestamp>U)|' .
|
||||
'(?P<day>[djDl])|' .
|
||||
'(?P<month>[FMmn])|' .
|
||||
'(?P<year>[Yy])|' .
|
||||
'(?P<hour>[ghGH])|' .
|
||||
'(?P<minute>i)|' .
|
||||
'(?P<second>s)|' .
|
||||
'(?P<dayofyear>z)|' .
|
||||
'(?P<timestamp>U)|' .
|
||||
'[^djDlFMmnYyghGHiszU]' .
|
||||
')*/',
|
||||
$this->parseFormat,
|
||||
|
Reference in New Issue
Block a user