From d9108b9072a43df4a23aebbf7f0fe306f2c723e4 Mon Sep 17 00:00:00 2001 From: chad007 Date: Fri, 1 Apr 2016 09:47:30 +0800 Subject: [PATCH] fixed some problems causing runtime errors --- DependencyInjection/Compiler/FilterCompilerPass.php | 4 +++- DependencyInjection/Compiler/LocaleCompilerPass.php | 4 +++- DependencyInjection/Compiler/SortingCompilerPass.php | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DependencyInjection/Compiler/FilterCompilerPass.php b/DependencyInjection/Compiler/FilterCompilerPass.php index d1a60ba..a107dbf 100644 --- a/DependencyInjection/Compiler/FilterCompilerPass.php +++ b/DependencyInjection/Compiler/FilterCompilerPass.php @@ -23,7 +23,9 @@ class FilterCompilerPass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { - if (!$container->hasDefinition(self::SERVICE_NAME)) continue; + if (!$container->hasDefinition(self::SERVICE_NAME)) { + return; + } $definition = $container->getDefinition(self::SERVICE_NAME); $taggedServices = $container->findTaggedServiceIds(self::TAG_NAME); diff --git a/DependencyInjection/Compiler/LocaleCompilerPass.php b/DependencyInjection/Compiler/LocaleCompilerPass.php index e414a68..05ae4d5 100644 --- a/DependencyInjection/Compiler/LocaleCompilerPass.php +++ b/DependencyInjection/Compiler/LocaleCompilerPass.php @@ -23,7 +23,9 @@ class LocaleCompilerPass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { - if (!$container->hasDefinition(self::LOCALE_PARSER_SERVICE)) continue; + if (!$container->hasDefinition(self::LOCALE_PARSER_SERVICE)) { + return; + } $definition = $container->getDefinition(self::LOCALE_PARSER_SERVICE); $taggedServices = $container->findTaggedServiceIds(self::TAG_NAME); diff --git a/DependencyInjection/Compiler/SortingCompilerPass.php b/DependencyInjection/Compiler/SortingCompilerPass.php index 20a9306..f3c5c26 100644 --- a/DependencyInjection/Compiler/SortingCompilerPass.php +++ b/DependencyInjection/Compiler/SortingCompilerPass.php @@ -23,7 +23,9 @@ class SortingCompilerPass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { - if (!$container->hasDefinition(self::SERVICE_NAME)) continue; + if (!$container->hasDefinition(self::SERVICE_NAME)) { + return; + } $definition = $container->getDefinition(self::SERVICE_NAME); $taggedServices = $container->findTaggedServiceIds(self::TAG_NAME);