瀏覽代碼

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