7
A long time after I looked again to this and found a simple solution. I modified the code like this
if (defined('SID') && (! isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
if (SID){
if (!strstr($url, '?')) {
$url .= '?' . SID;
} else {
$url .= '&'.SID;
}
}
}
So I added a little check to see if SID has a true value. This way the "?" is not added if SID is an empty string.