Selaa lähdekoodia

[Locale] match reverseMatchingRegExp against full string value

Igor Wiedler 14 vuotta sitten
vanhempi
commit
51e9d8946b

+ 1 - 1
src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php

@@ -124,7 +124,7 @@ class FullTransformer
     public function parse(\DateTime $dateTime, $value)
     {
         $reverseMatchingRegExp = $this->getReverseMatchingRegExp($this->pattern);
-        $reverseMatchingRegExp = '/'.$reverseMatchingRegExp.'/';
+        $reverseMatchingRegExp = '/^'.$reverseMatchingRegExp.'$/';
 
         $options = array();