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 » LiveUser » Bug #7262

PDO: Warnings on wrong login credentials

Details

Submitted2006-03-30 13:47 UTC
Frommarc dot jakubowski at gmail dot com
Assignedlsmith
StatusClosed
PackageLiveUser
PHP Version5.1.1
OSXP
Roadmaps(Not assigned)

Comments

[2006-03-30 13:47 UTC] marc dot jakubowski at gmail dot com

Description:
------------
Again an issue with the PDO driver.
When submitting $lu->login() with wrong credentials, I get 4 warnings:

Notice: Undefined offset: 0 in D:\Programme\xampp\php\pear\LiveUser\Auth\PDO.php on line 279

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in D:\Programme\xampp\php\pear\LiveUser\Auth\Common.php on line 383

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in D:\Programme\xampp\php\pear\LiveUser\Auth\Common.php on line 459

Notice: Undefined offset: 0 in D:\Programme\xampp\php\pear\LiveUser\Perm\Storage\PDO.php on line 168

When the query that looks in the database if there is a user with the given password, the result is checked in LiveUser\Auth\PDO.php line 265 with

if ($row === false)

but the PDO::fetchAll() method always returns an array either with the rows of the result or an empty array if no rows were found. So because of $row never being === false, the line should be changed to

if (empty($row))

[2006-03-30 14:36 UTC] marc dot jakubowski at gmail dot com

oops bug belongs to LiveUser, not to LiveUser_Admin