#105 sess->url($url) wrong if $myurl[0]=="?"

7.4pre1
open
nobody
Session (11)
5
2002-11-12
2002-11-12
Anonymous
No

I'd give an example:

$myurl ="?someparam=XYZ";
$sessurl = $sess->url($myurl);

Result:
$sessurl => "?someparam=XYZ?MYSESSION_ID=xxxxxxxxxxx"

NOTE the *second* "?" ! This is because "?" is at
position 0 in $myurl. The problem is in sess->url()
function:

Line 193:
$url .= ( strpos($url, "?") != false ? "&" :
"?" ).

Must be:
$url .= ( strpos($url, "?") !== false ? "&" :
"?" ).

(for PHP 4.0.b3 and newer).

The best way is to use regex, though. Maybe, I don't
know. Just reporting a serious bug.

regards,
plamendp

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks