| Bug #1908 | Session added to redirect with $param |
| Submitted: |
2004年07月19日 05:05 UTC |
| From: |
ok at tagilbank dot ru |
Assigned: |
mike |
| Status: |
Closed |
Package: |
HTTP_Header |
| PHP Version: |
4.3.4 |
OS: |
| Roadmaps: |
(Not assigned) |
[2004年07月19日 05:05 UTC] ok at tagilbank dot ru
Description:
------------
In 1.0.0RC1 HTTP_Header::redirect():
if $param = array the function generates session_name (but not need to do it).
Reproduce code:
---------------
if ($param || (!isset($param) && ini_get('session.use_trans_sid'))) {
$qs[] = session_name() .'='. session_id();
}
----------------------
should be:
if ($param===true || (!isset($param) && ini_get('session.use_trans_sid'))) {
$qs[] = session_name() .'='. session_id();
}
----------------------
HTTP_Header::redirect("/some.php", array("aa" => "bb"))
Expected result:
----------------
/some.php?aa=bb
Actual result:
--------------
/some.php?session=1aa615d479df24cb16570b3c64e85d94&aa=bb
Comments
[2004年07月19日 09:30 UTC] mike
This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.
In case this was a pear.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.
Thanks for your report.
I added an third optional parameter to simplify the usage of HTTP_Header::redirect(), which indicates if you wish to add the session to the querystring.
[2004年07月23日 05:11 UTC] ok at tagilbank dot ru
for version 1.0.0
in HTTP_Header::redirect()
If I have empty $_SERVER['QUERY_STRING'] the code:
$url .= (isset($purl['query']) ? '&' : '?') . implode('&', $qs);
adding "?" at the end of url.
[2004年07月23日 11:23 UTC] mike
I don't see a problem with that, do you?
[2004年07月28日 14:22 UTC] mike
Ooops, Bug status should have been "Feedback". However, the latter issue has been fixed in CVS - and *please* open a separate Bug report for different issues.
Thanks