소스 검색

[Console] fixed PHP notice

Fabien Potencier 14 년 전
부모
커밋
e232218eed
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/Symfony/Component/Console/Formatter/OutputFormatter.php

+ 5 - 1
src/Symfony/Component/Console/Formatter/OutputFormatter.php

@@ -195,7 +195,11 @@ class OutputFormatter implements OutputFormatterInterface
             return '';
         }
 
-        if ('style' == $match[1]) {
+        if (!isset($match[1])) {
+            $match[1] = '';
+        }
+
+        if ('' == $match[1]) {
             $style = new OutputFormatterStyle();
         } else {
             if (!isset($this->styles[strtolower($match[1])])) {