From 5d2bea22c1ad9fb17ed252577bb21951eb017e37 Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Fri, 2 Jun 2017 11:22:10 +0200 Subject: [PATCH] For when _locale is passed in, but empty / false. Fixes a quirk in Bolt 3.3 --- src/Routing/LocalizedUrlGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Routing/LocalizedUrlGenerator.php b/src/Routing/LocalizedUrlGenerator.php index e7edf01..ea13d2a 100644 --- a/src/Routing/LocalizedUrlGenerator.php +++ b/src/Routing/LocalizedUrlGenerator.php @@ -35,7 +35,7 @@ public function __construct(UrlGeneratorInterface $wrapped, Application $app) */ public function generate($name, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) { - if (!isset($parameters['_locale']) && $name !== "thumb") { + if (empty($parameters['_locale']) && $name !== "thumb") { $parameters['_locale'] = $this->app['translate.slug']; }