瀏覽代碼

fixed regex (we don't need '?')

Brikou CARRE 14 年之前
父節點
當前提交
a83046f470
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/Form/Type/AbstractType.php

+ 1 - 1
src/Symfony/Component/Form/Type/AbstractType.php

@@ -47,7 +47,7 @@ abstract class AbstractType implements FormTypeInterface
 
     public function getName()
     {
-        if (preg_match('/\\\\([a-z]+)(?:Form|Type)?$/im', get_class($this), $matches)) {
+        if (preg_match('/\\\\([a-z]+)(?:Form|Type)$/im', get_class($this), $matches)) {
             $name = strtolower($matches[1]);
         }