From e7726cddd702a7813f76406f57899573743e30bd Mon Sep 17 00:00:00 2001 From: rGaillard Date: Wed, 3 Oct 2012 09:28:06 +0000 Subject: [PATCH] // Fix #PSCFV-4361 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17706 b9a71923-0436-4b27-9f14-aed3839534dd --- install-dev/upgrade/upgrade.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install-dev/upgrade/upgrade.php b/install-dev/upgrade/upgrade.php index c7e3a4ac2..cb9867f3d 100644 --- a/install-dev/upgrade/upgrade.php +++ b/install-dev/upgrade/upgrade.php @@ -42,7 +42,13 @@ if (substr($memory_limit,-1) != 'G' // redefine REQUEST_URI if empty (on some webservers...) if (!isset($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI'] == '') - $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; +{ + if (!isset($_SERVER['SCRIPT_NAME']) && isset($_SERVER['SCRIPT_FILENAME'])) + $_SERVER['SCRIPT_NAME'] = $_SERVER['SCRIPT_FILENAME']; + else + $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; +} + if ($tmp = strpos($_SERVER['REQUEST_URI'], '?')) $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'], 0, $tmp); $_SERVER['REQUEST_URI'] = str_replace('//', '/', $_SERVER['REQUEST_URI']);