Skip to content
Permalink
Browse files

Update webroot files to fix an issue in ServerShell.

The previous fixes done in 2918ae9
caused other issues preventing actions from being dispatched properly.

Fixes #3934
  • Loading branch information...
markstory committed Jul 27, 2013
1 parent b345a8f commit c28cde4e56304d6f9c85c504a6c23c147a63059c
Showing with 2 additions and 4 deletions.
  1. +1 −2 app/webroot/index.php
  2. +1 −2 lib/Cake/Console/Templates/skel/webroot/index.php
@@ -79,8 +79,7 @@
// 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 @@
// 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__);

0 comments on commit c28cde4

Please sign in to comment.
You can’t perform that action at this time.