Re: LiveUser PDO driver sets authiniterror on empty datasets

From: Date: Mon, 05 Jun 2006 09:57:46 +0000
Subject: Re: LiveUser PDO driver sets authiniterror on empty datasets
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24246@lists.php.net to get a copy of this message
Bjarte Kalstveit Vebjørnsen wrote:
Hello, Today when messing around with LiveUser 0.16.11 package i tried to change from MDB2 driver to PDO driver. Then I got an LIVEUSER_STATUS_AUTHINITERROR status code instead of LIVEUSER_STATUS_AUTHFAILED when I tried to login with wrong credentials. After a bit of debugging I found line 261 in Auth/PDO.php and Atleast on my install (winxp, php 5.1.4) it seems $res->fetch(PDO::FETCH_ASSOC); returns false with empty datasets. Which would trigger an error, and causing login method in LiveUser.php to set status to LIVEUSER_STATUS_AUTHINITERROR. I see from the cvs log that this was fixed in the revsion 1.17 of the file. But was later changed back. Is there a reason for the check there? Can I safely remove it? Should I file a bug report?
Ah, now I remember why Arnaud switched to fetchAll() .. I applied a fix to CVS. Hopefully that solves the issue: http://cvs.php.net/viewcvs.cgi/pear/LiveUser/Auth/PDO.php?r1=1.21&r2=1.22&diff_format=u regards, Lukas

« previous php.pear.general (#24246) next »