From deb3308cb0e1eb8ff2dc0ec98e3d0f45c70128cd Mon Sep 17 00:00:00 2001 From: Tom Witkowski Date: Thu, 27 Aug 2020 17:02:32 +0200 Subject: [PATCH 1/2] allow to reset forced scheme and root-url --- src/Illuminate/Routing/UrlGenerator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Routing/UrlGenerator.php b/src/Illuminate/Routing/UrlGenerator.php index 1880be1bf957..ae4f9b0db14d 100755 --- a/src/Illuminate/Routing/UrlGenerator.php +++ b/src/Illuminate/Routing/UrlGenerator.php @@ -616,25 +616,25 @@ public function getDefaultParameters() /** * Force the scheme for URLs. * - * @param string $scheme + * @param string|null $scheme * @return void */ public function forceScheme($scheme) { $this->cachedScheme = null; - $this->forceScheme = $scheme.'://'; + $this->forceScheme = $scheme ? $scheme . '://' : null; } /** * Set the forced root URL. * - * @param string $root + * @param string|null $root * @return void */ public function forceRootUrl($root) { - $this->forcedRoot = rtrim($root, '/'); + $this->forcedRoot = $root ? rtrim($root, '/') : null; $this->cachedRoot = null; } From 7a9761978223255eeb7b15abb4a742d3fbc0264f Mon Sep 17 00:00:00 2001 From: Tom Witkowski Date: Thu, 27 Aug 2020 17:13:20 +0200 Subject: [PATCH 2/2] fix StyleCI --- src/Illuminate/Routing/UrlGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Routing/UrlGenerator.php b/src/Illuminate/Routing/UrlGenerator.php index ae4f9b0db14d..6c406cad7c9b 100755 --- a/src/Illuminate/Routing/UrlGenerator.php +++ b/src/Illuminate/Routing/UrlGenerator.php @@ -623,7 +623,7 @@ public function forceScheme($scheme) { $this->cachedScheme = null; - $this->forceScheme = $scheme ? $scheme . '://' : null; + $this->forceScheme = $scheme ? $scheme.'://' : null; } /**