Hello Community,
in http://cmsimpleforum.com/viewtopic.php?f=6&t=5969 it was pointed out, that $_SERVER['REQUEST_URI'] throws the notice "Undefined index: REQUEST_URI", as this CGI variable is not part of the CGI specification (RFC 3875), and not set by IIS (and perhaps other web servers).
It is used unconditionally in only one place in the core (cmsimple/cms.php line 126). In my reply to the report I suggested as quick fix to use SCRIPT_NAME instead. But I'm not sure, that using SCRIPT_NAME generally fits (cf. http://cmsimpleforum.com/viewtopic.php?f=6&t=5444). Any ideas?
Anyway, we should fix this issue for 1.5.7 somehow.
Christoph
XH 1.5.7: REQUEST_URI
XH 1.5.7: REQUEST_URI
Christoph M. Becker – Plugins for CMSimple_XH
Re: XH 1.5.7: REQUEST_URI
To clarify: the effect was that subsites did not work on such servers.cmb wrote:that $_SERVER['REQUEST_URI'] throws the notice "Undefined index: REQUEST_URI"
I have fixed that now for CMSimple_XH 1.5.7 in a way that should not change behavior for installations where it already worked:
Code: Select all
$temp = isset($_SERVER['REQUEST_URI'])
? str_replace($_SERVER['QUERY_STRING'],'',$_SERVER['REQUEST_URI'])
: $_SERVER['SCRIPT_NAME'];
$subsite_folder_array = explode('/', $temp); // creates array
Christoph M. Becker – Plugins for CMSimple_XH