PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Header » Bug #1908

Session added to redirect with $param

Details

Submitted2004-07-19 05:05 UTC
Fromok at tagilbank dot ru
Assignedmike
StatusClosed
PackageHTTP_Header
PHP Version4.3.4
Roadmaps(Not assigned)

Comments

[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

[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.