Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.1

Bug #1908 Session added to redirect with $param
Submitted: 2004-07-19 00:05 UTC Modified: 2004-07-28 09:22 UTC
From: ok at tagilbank dot ru Assigned: mike
Status: Closed Package: HTTP_Header
PHP Version: 4.3.4 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-07-19 00: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 04: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 00: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 06:23 UTC] mike
I don't see a problem with that, do you?
 [2004-07-28 09: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