Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #18175 Using MDB2::factory raises fatal error
Submitted: 2011-01-04 23:17 UTC
From: nutcracker Assigned: quipo
Status: Closed Package: MDB2 (version 2.5.0b3)
PHP Version: 5.3.4 OS:
Roadmaps: 2.5.0b4    
Subscription  


 [2011-01-04 23:17 UTC] nutcracker (Daniela Richter)
Description: ------------ Fatal error: Cannot make static method PEAR::raiseError() non static in class MDB2_Driver_Common in /PEAR/MDB2.php on line 995 Test script: --------------- require 'MDB2.php'; $dsn = array( 'phptype' => 'mysql', 'username' => DB_USER, 'password' => DB_PASSWORD, 'hostspec' => DB_HOST, 'database' => DB_NAME, ); $mdb2 = MDB2::factory($dsn); if (PEAR::isError($mdb2)) { die($mdb2->getMessage()); } Expected result: ---------------- Establish connection to database

Comments

 [2011-02-20 09:52 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
http://svn.php.net/viewvc/pear/pear-core/trunk/PEAR.php?view=markup#l472 I'm very confused as PEAR::raiseError is not defined as static - is there anything non standard about your pear install?
 [2011-03-06 17:40 UTC] quipo (Lorenzo Alberton)
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: quipo
Daniela, if you changed PEAR::raiseError() to be static, you need to change all references of $db->raiseError(), $this->db->raiseError() and $this->raiseError() to MDB2_Driver_Common::raiseError()