Skip to content

Commit 795a027

Browse files
ENGCOM-4653: Remove direct $_SERVER variable use #20968
- Merge Pull Request #20968 from dominicfernando/magento2:code-cleanup-remove-server - Merged commits: 1. 8af727d
2 parents 4a28abb + 8af727d commit 795a027

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Store/Model/Store.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,8 @@ protected function _updatePathUseRewrites($url)
716716
if ($this->_isCustomEntryPoint()) {
717717
$indexFileName = 'index.php';
718718
} else {
719-
$indexFileName = basename($_SERVER['SCRIPT_FILENAME']);
719+
$scriptFilename = $this->_request->getServer('SCRIPT_FILENAME');
720+
$indexFileName = basename($scriptFilename);
720721
}
721722
$url .= $indexFileName . '/';
722723
}

0 commit comments

Comments
 (0)