mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Update webroot files to fix an issue in ServerShell.
The previous fixes done in 2918ae9c7a
caused other issues preventing actions from being dispatched properly.
Fixes #3934
This commit is contained in:
parent
b345a8f180
commit
c28cde4e56
2 changed files with 2 additions and 4 deletions
|
@ -79,8 +79,7 @@ if (!defined('WWW_ROOT')) {
|
|||
|
||||
// for built-in server
|
||||
if (php_sapi_name() == 'cli-server') {
|
||||
$uri = str_replace($_SERVER['SCRIPT_FILENAME'], WWW_ROOT, '');
|
||||
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $uri)) {
|
||||
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
|
||||
return false;
|
||||
}
|
||||
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
|
||||
|
|
|
@ -79,8 +79,7 @@ if (!defined('WWW_ROOT')) {
|
|||
|
||||
// for built-in server
|
||||
if (php_sapi_name() === 'cli-server') {
|
||||
$uri = str_replace($_SERVER['SCRIPT_FILENAME'], WWW_ROOT, '');
|
||||
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $uri)) {
|
||||
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
|
||||
return false;
|
||||
}
|
||||
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
|
||||
|
|
Loading…
Reference in a new issue