Skip to content

Commit 74ef94a

Browse files
committed
fix: fixed the codeigniter routing for installations in subdirectories with the page index 3.
in the SiteURIFactory I checked that the requestUri is not null
1 parent 89ce426 commit 74ef94a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/HTTP/SiteURIFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private function parseRequestURI(): string
135135

136136
if($baseUri && !is_null($serverRequestUri)) $serverRequestUri = ltrim($serverRequestUri, $baseUri); // We remove the base Uri from the request URI if it exists, baseUri is the path to the subdirectory
137137
if($indexPage && !is_null($serverRequestUri)) $serverRequestUri = ltrim($serverRequestUri, "/" . $indexPage); // We remove the index page from the request URI if it exists
138-
$serverRequestUri = "/". ltrim($serverRequestUri, '/'); // makes sure that the uri starts with a slash
138+
if(!is_null($serverRequestUri)) $serverRequestUri = "/". ltrim($serverRequestUri, '/'); // makes sure that the uri starts with a slash
139139

140140
if (
141141
$serverRequestUri === null

0 commit comments

Comments
 (0)