소스 검색

Fixed previous commit

Christophe Coevoet 14 년 전
부모
커밋
893bafdcc5
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/Symfony/Bundle/MonologBundle/DependencyInjection/Configuration.php

+ 6 - 0
src/Symfony/Bundle/MonologBundle/DependencyInjection/Configuration.php

@@ -66,10 +66,16 @@ class Configuration
                         ->scalarNode('level')->defaultValue('DEBUG')->end()
                         ->booleanNode('bubble')->defaultFalse()->end()
                         ->scalarNode('path')->end() // stream specific
+                        ->validate()
+                            ->ifTrue(function($v) { return 'stream' === $v['type'] && !isset($v['path']); })
+                            ->thenInvalid('The path has to be specified to use a StreamHandler')
+                        ->end()
                     ->end()
                     ->validate()
                         ->ifTrue(function($v) { return 'fingerscrossed' === $v['type'] && !isset($v['handler']); })
                         ->thenInvalid('The handler has to be specified to use a FingersCrossedHandler')
+                    ->end()
+                    ->validate()
                         ->ifTrue(function($v) { return 'stream' === $v['type'] && !isset($v['path']); })
                         ->thenInvalid('The path has to be specified to use a StreamHandler')
                     ->end()