PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » Auth » Bug #7860

Don't use session_register!

Details

Request #7860Don't use session_register!
Submitted2006-06-10 20:35 UTC
Frompeter dot nagy at interware dot hu
Assignedaashley
StatusClosed
PackageAuth
PHP VersionIrrelevant
OS*
Roadmaps(Not assigned)

Comments

[2006-06-10 20:35 UTC] peter dot nagy at interware dot hu

Description:
------------
The package uses the session_register() function in the constructor on line 289, but the function is deprecated if one is uses the $_SESSION or $HTTP_SESSION_VARS array, as it is mentioned in the PHP manual at http://hu2.php.net/manual/hu/function.session-register.php
page.

Test script:
---------------
if( !isset($_SESSION[$this->_sessionName]) && !isset($GLOBALS['HTTP_SESSION_VARS'][$this->_sessionName])) {
session_register($this->_sessionName);
}

this should be something like:
if( !isset($_SESSION[$this->_sessionName]) && !isset($GLOBALS['HTTP_SESSION_VARS'][$this->_sessionName])) {
$_SESSION[$this->_sessionName] = array();
}

[2006-08-10 02:12 UTC] aashley at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.