From fde3216efdb84392aeb7c53df1f2df2c0a6bd74f Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 24 Jul 2023 09:37:34 +0900 Subject: [PATCH] refactor: remove string array access It is difficult to understand. --- system/HTTP/SiteURIFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/HTTP/SiteURIFactory.php b/system/HTTP/SiteURIFactory.php index 49ee3bf3ed73..fcf295c82b02 100644 --- a/system/HTTP/SiteURIFactory.php +++ b/system/HTTP/SiteURIFactory.php @@ -131,7 +131,7 @@ private function parseRequestURI(): string // Strip the SCRIPT_NAME path from the URI if ( - $path !== '' && isset($this->superglobals->server('SCRIPT_NAME')[0]) + $path !== '' && $this->superglobals->server('SCRIPT_NAME') !== '' && pathinfo($this->superglobals->server('SCRIPT_NAME'), PATHINFO_EXTENSION) === 'php' ) { // Compare each segment, dropping them until there is no match