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 » Authentication » Auth_RADIUS » Bug #4481

Incorrect parameter pass to radius_put_int

Details

Submitted2005-05-31 00:16 UTC
Frommike at pofp dot com
Assignedmbretter
StatusClosed
PackageAuth_RADIUS
PHP Version5.0.4
OSWindows 2000
Roadmaps(Not assigned)

Comments

[2005-05-31 00:16 UTC] mike at pofp dot com

Description:
------------
Trying to use this package, I receive this with every call to the putAttribute function:

Warning: radius_put_int() expects parameter 1 to be resource, null given in c:\php\PEAR\Auth\RADIUS.php on line 186

This parameter is delibrately set to null earlier on line 79.

Reproduce code:
---------------
$racct = new Auth_RADIUS_Acct_Stop;
$racct->addServer($server, 0, $shared);
$racct->putAttribute(RADIUS_USER_NAME,$username);
$racct->open();
$status = $racct->start();

Expected result:
----------------
No error message given

Actual result:
--------------
Error message, although code still seems to work

[2005-05-31 18:00 UTC] mike at pofp dot com

Correction, the code doesn't work after the error message! I took another look at my example code, and obviously it isn't using radius_put_int. Sorry.

[2005-10-16 16:50 UTC] mbretter at php dot net

You must invoke:
start()
before you can put attributes:
$racct = new Auth_RADIUS_Acct_Stop;
$racct->addServer($server, 0, $shared);
$status = $racct->start();
$racct->putAttribute(RADIUS_USER_NAME,$username);