Auth bug
| From: | LIMBOURG Arnaud | Date: | Wed, 28 Aug 2002 13:58:33 +0000 |
| Subject: | Auth bug | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-8709@lists.php.net to get a copy of this message | ||
Hello
Auth started to behave badly again by loosing some session vars.
First, i spotted a wrong call in setAuth, at the end of the function (too
lazy for a one line diff)
the call to setAuthData should be static otherwise it breaks when you have
you own container using the addtional $data paramater
if (!empty($data)) {
Auth::setAuthData($data);
}
Second,
in setAuthData
function setAuthData($data)
{
if (isset($session['auth']['data'])) {
$olddata = $session['auth']['data'];
} else {
$olddata = null;
}
$session['auth']['data'] = $data;
die(var_dump::display($_SESSION));
return $olddata;
}
The session does not show the additional data, even though the $data
parameter contains data.
Apparently the variable does not get registered. I tried a workaround by
adding
$session['auth']['data'] = array();
in setAuth but the result is the same except i have ['auth']['data'] as an
empty array which is expected but the array never gets filled !
The problem appears under php 4.2.1/winnt and php 4.1.2/linux.
Arnaud.