Check if PATH_INFO is set to avoid undefined index errors. see #5160
git-svn-id: http://svn.automattic.com/wordpress/trunk@7757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8aa8fbfd28
commit
8d6d1af393
|
@ -69,10 +69,12 @@ if ( empty( $_SERVER['REQUEST_URI'] ) ) {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
|
// Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
|
||||||
if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
|
if ( isset($_SERVER['PATH_INFO']) ) {
|
||||||
$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
|
if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
|
||||||
else
|
$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
|
||||||
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
|
else
|
||||||
|
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
|
||||||
|
}
|
||||||
|
|
||||||
// Append the query string if it exists and isn't null
|
// Append the query string if it exists and isn't null
|
||||||
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
|
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
|
||||||
|
|
Loading…
Reference in New Issue