autoloader bug in xampp PEAR/DB

Problems with the Windows version of XAMPP, questions, comments, and anything related.

autoloader bug in xampp PEAR/DB

Postby molecularbear » 08. February 2012 21:49

xampp 1.7.7 includes version 1.7.13 of the PEAR/DB package. When using the PEAR/DB/mysql.php driver, I have encountered a bug when calling execute() on a PEAR/DB object. What happens is that a call to PEAR/DB/common.php's execute() is made, which in turn does a DB::isError check on the result of $this->executeEmulateQuery($stmt, $data). The problem is isError is defined like this:

Code: Select all

    function isError
($value)
    {
        return is_a($value, 'DB_Error');
    }
 


Because I have autoloading turned on, and because $value is an SQL string in this case, I get an error that looks like this:

Code: Select all
ERROR: The class 'SELECT * FROM foo' could not be found in ...


In version 1.7.14 of PEAR/DB, the problem has apparently been fixed:

Code: Select all

    function isError
($value)
    {
        return is_object($value) && is_a($value, 'DB_Error');
    }
 


Long story short: xampp should probably use PEAR/DB 1.7.14.
molecularbear
 
Posts: 2
Joined: 08. February 2012 21:11
Operating System: Windows 7 Ultimate

Re: autoloader bug in xampp PEAR/DB

Postby Altrea » 08. February 2012 21:59

well, it's PEAR.
update it!?

Maybe i don't understand, what you really want to say :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: autoloader bug in xampp PEAR/DB

Postby molecularbear » 08. February 2012 22:53

Altrea wrote:Maybe i don't understand, what you really want to say :D


I was just recommending that xampp be packaged with PEAR/DB version 1.7.14 instead of the (possibly) broken PEAR/DB 1.7.13.
molecularbear
 
Posts: 2
Joined: 08. February 2012 21:11
Operating System: Windows 7 Ultimate


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 77 guests