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

Bug #12190 missing error return in DB_Table_Manager::create()
Submitted: 2007-10-06 07:21 UTC
From: cwiedmann Assigned: wiesemann
Status: Closed Package: DB_Table (version 1.5.0)
PHP Version: Irrelevant OS: Windows_NT
Roadmaps: (Not assigned)    
Subscription  


 [2007-10-06 07:21 UTC] cwiedmann (Carsten Wiedmann)
Description: ------------ Hi Mark, if there is an error during the column validation, there is no return with the mdb2 backend. Regards, Carsten Test script: --------------- <?php require_once 'MDB2.php'; require_once 'DB/Table.php'; class Test_Table extends DB_Table { var $col = array( 'db_table' => array( 'type' => 'varchar', 'size' => 65535 ) ); } $conn = MDB2::connect('mysqli://root@localhost/test'); if (PEAR::isError($conn)) { die($conn->getMessage()); } $TestTable = new Test_Table($conn, 'db_table', 'drop'); if ($TestTable->error) { die($TestTable->error->getMessage()); } ?> Expected result: ---------------- DB_TABLE Error - String column declaration not valid (size='65535') Actual result: -------------- Fatal error: Cannot use object of type PEAR_Error as array in \pear\MDB2\Driver\Manager\Common.php on line 96

Comments

 [2007-11-21 16:20 UTC] wiesemann (Mark Wiesemann)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. --- Sorry for the delay ... Thanks for the patch, this is now fixed.