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

Bug #6227 Typo in function _fetchTableNames()
Submitted: 2005-12-12 11:40 UTC
From: bate Assigned: quipo
Status: Closed Package: Translation2
PHP Version: 5.0.5 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2005-12-12 11:40 UTC] bate
Description: ------------ File: Translation2\Admin\Container\mdb2.php function _fetchTableNames() { $this->db->loadModule('manager'); return $this->db->manager->listTables(); } this code doesnt work under Linux/Unix becaus directory MDB2/Driver/manager doesnt exists. Solution: function _fetchTableNames() { $this->db->loadModule('Manager'); return $this->db->manager->listTables(); } 'Manager' should fix this. Maybe also add additional checks in the specific funktion to ucfirst($module) .. or something like this. Test script: --------------- $tr = Translation2_Admin::factory('MDB2', $_db_options, $_tl_options); if (PEAR::isError($tr)) { echo $tr->getMessage(); die(); } $newLang = array( 'lang_id' => 'de', 'table_name' => 'i18n', 'name' => 'deutsch', 'meta' => 'iso-8859-1', 'error_text' => 'keine Übersetzung vorhanden', 'encoding' => 'iso-8859-1', ); $tr->addLang($newLang); Expected result: ---------------- output should be empty Actual result: -------------- Notice: Undefined property: MDB2_Driver_mysqli::$manager in /usr/local/lib/php/Translation2/Admin/Container/mdb2.php on line 69 Fatal error: Call to a member function listTables() on a non-object in /usr/local/lib/php/Translation2/Admin/Container/mdb2.php on line 69

Comments

 [2005-12-12 17:56 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. not really a typo, but a change in MDB2, where it was removed a ucfirst() call...