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
|
// Check which of the date parts are present in the pattern
|
||||||
preg_match(
|
preg_match(
|
||||||
'/(' .
|
'/(' .
|
||||||
'(?<day>[djDl])|' .
|
'(?P<day>[djDl])|' .
|
||||||
'(?<month>[FMmn])|' .
|
'(?P<month>[FMmn])|' .
|
||||||
'(?<year>[Yy])|' .
|
'(?P<year>[Yy])|' .
|
||||||
'(?<hour>[ghGH])|' .
|
'(?P<hour>[ghGH])|' .
|
||||||
'(?<minute>i)|' .
|
'(?P<minute>i)|' .
|
||||||
'(?<second>s)|' .
|
'(?P<second>s)|' .
|
||||||
'(?<dayofyear>z)|' .
|
'(?P<dayofyear>z)|' .
|
||||||
'(?<timestamp>U)|' .
|
'(?P<timestamp>U)|' .
|
||||||
'[^djDlFMmnYyghGHiszU]' .
|
'[^djDlFMmnYyghGHiszU]' .
|
||||||
')*/',
|
')*/',
|
||||||
$this->parseFormat,
|
$this->parseFormat,
|
||||||
|
Reference in New Issue
Block a user