Преглед изворни кода

[Locale] match reverseMatchingRegExp against full string value

Igor Wiedler пре 14 година
родитељ
комит
51e9d8946b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php

+ 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();