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

Bug #6465 Bogus error in tableInfo()
Submitted: 2006-01-11 15:36 UTC
From: wiesemann Assigned: quipo
Status: Closed Package: MDB2_Driver_ibase
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2006-01-11 15:36 UTC] wiesemann
Description: ------------ When using $db->reverse->tableInfo() with a Firebird 1.5 database (table created via PEAR DB and DB_Table) a possible result of tableInfo() for one field is (before call of $db->datatype->mapNativeDatatype($res[$i])): array(5) { table => string(5) test2 name => string(5) feld7 type => string(12) NUMERIC(9,2) length => string(1) 4 flags => string(0) } NUMERIC(9,2) is then converted to lowercase => numeric(9,2). But 'numeric(9,2)' won't be matched by switch ($db_type) in mapNativeDatatype(). Suggested code change: Add the following three lines atfer line 425 in Driver/Reverse/ibase.php ($info = @ibase_field_info($id, $i);): if (($pos = strpos($info['type'], '(')) !== false) { $info['type'] = substr($info['type'], 0, $pos); } I can provide a patch including this addition, if you agree.

Comments

 [2006-01-11 20:47 UTC] wiesemann
Patch: www.markwiesemann.de/php/MDB2/MDB2_Reverse_ibase.patch
 [2006-01-12 09:18 UTC] quipo
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.