From b09bc7bc9462b292ce9cd0cbbc40391491c8e25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20LOUSSINIAN?= Date: Tue, 30 Aug 2022 11:24:22 +0200 Subject: [PATCH] fix(parser): parser could find route and routes in config (#72) Co-authored-by: raphaelloussinian --- src/M6Web/Bundle/LogBridgeBundle/Config/FilterParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/M6Web/Bundle/LogBridgeBundle/Config/FilterParser.php b/src/M6Web/Bundle/LogBridgeBundle/Config/FilterParser.php index 385d9ce..2af1132 100644 --- a/src/M6Web/Bundle/LogBridgeBundle/Config/FilterParser.php +++ b/src/M6Web/Bundle/LogBridgeBundle/Config/FilterParser.php @@ -74,7 +74,7 @@ public function parse(string $name, array $config): Filter throw new ParseException(sprintf('Undefined "route(s)", "method" or "status" parameter from filter "%s"', $name)); } - if (array_key_exists('route', $config) && array_key_exists('routes', $config)) { + if ((array_key_exists('route', $config) && $config['route'] !== null) && (array_key_exists('routes', $config) && !empty($config['routes']))) { throw new ParseException(sprintf('You can\'t use both "route" and "routes" parameter from filter "%s"', $name)); }