Skip to content

Commit

Permalink
Update src/Symfony/Component/Form/Extension/Core/DataTransformer/Date…
Browse files Browse the repository at this point in the history
…TimeToStringTransformer.php

Fix `preg_match` to work with older PCRE.
  • Loading branch information
stloyd committed Dec 20, 2012
1 parent d97829e commit 2a2c468
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -160,14 +160,14 @@ public function reverseTransform($value)
// 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,
Expand Down

0 comments on commit 2a2c468

Please sign in to comment.