From b2a4ef3db887e0690c653a065af36b66b45e5eb8 Mon Sep 17 00:00:00 2001 From: Divine Niiquaye Ibok Date: Tue, 11 Oct 2022 02:10:51 +0000 Subject: [PATCH] Fixed minor issue in the path middleware class --- src/Middlewares/PathMiddleware.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Middlewares/PathMiddleware.php b/src/Middlewares/PathMiddleware.php index 2763443..dc684b0 100644 --- a/src/Middlewares/PathMiddleware.php +++ b/src/Middlewares/PathMiddleware.php @@ -53,10 +53,7 @@ public function __construct( ) { $this->permanent = $permanent; $this->keepRequestMethod = $keepRequestMethod; - - if (!empty($uriSuffixes)) { - $this->uriSuffixes = \array_combine($uriSuffixes, $uriSuffixes); - } + $this->uriSuffixes = empty($uriSuffixes) ? ['/' => '/'] : \array_combine($uriSuffixes, $uriSuffixes); } /**