Home » Authentication » Auth » Bug #3795
throws error with non-array "dsn"?
Details
| Submitted | 2005-03-12 17:40 UTC |
|---|---|
| From | jcnorris at me3 dot com |
| Assigned | aashley |
| Status | Closed |
| Package | Auth |
| PHP Version | 5.0.3 |
| OS | Windoze |
| Roadmaps | (Not assigned) |
Comments
[2005-03-12 17:40 UTC] jcnorris at me3 dot com
Description:
------------
Version 1.2.3 of Auth:
This stopped me cold. Nobody else has this issue? Probably something I've done:
Lines 176 of Auth.php
function Auth($storageDriver, $options = '', $loginFunction = '', $showLogin = true)
{
if (!empty($options['sessionName'])) {
$this->_sessionName = $options['sessionName'];
unset($options['sessionName']);
}
If $option is supplied as a string, $options['sessionName'] duly returns the 0-offset character of the string and the unset command throws an error. Ouch.
One possible fix (the one I've implemented):
function Auth($storageDriver, $options = '', $loginFunction = '', $showLogin = true)
{
if (is_array($options) && !empty($options['sessionName'])) {
$this->_sessionName = $options['sessionName'];
unset($options['sessionName']);
}
[2005-04-08 20:42 UTC] schalch at gmail dot com
I have the same issue, on different system, I try your fix.
[2005-10-15 10:09 UTC] phpstuff at artcore dot ch
same here.
pear -V
PEAR Version: 1.4.2
PHP Version: 5.0.5
Zend Engine Version: 2.0.5
Running on: Linux rakim 2.6.12-gentoo
[2006-02-21 05:41 UTC] aashley at php dot net
Documentation if for Auth 1.3.x not 1.2. 1.3 has had this problem fixed for a long time.
[2006-02-21 05:42 UTC] aashley at php dot net
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/Auth