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

Bug #13701 Undefined variable $db in Generator.php
Submitted: 2008-04-17 06:41 UTC
From: yousan Assigned: morse
Status: Closed Package: DB_Table (version 1.5.1)
PHP Version: 5.2.5 OS: FreeBSD 6.2-R
Roadmaps: (Not assigned)    

 [2008-04-17 06:41 UTC] yousan (Youichi Okada)
Description: ------------ I cannot use Generator.php. I read error message and suppose that the term "this->" is lack in Generator.php. I modified the Generator.php and can execute it successfully. The belowing is a patch I used. 489c489 < $this->db->setOption('portability', $portability); --- > $db->setOption('portability', $portability); Test script: --------------- <?php $edb = new edb(); $conn = $edb->get_mdb2(); $generator = new DB_Table_Generator($conn, $database); $generator->class_write_path = 'db/wordpress_test/'; $generator->generateTableClassFiles(); $generator->generateDatabaseFile(); ?> Actual result: -------------- Generator.php Fatal error: Call to a member function setOption() on a non-object in /usr/local/share/pear/DB/Table/Generator.php on line 489


 [2008-04-18 05:42 UTC] morse (David Morse)
Thanks for the report. Its been fixed in CVS by the proposed patch.
 [2008-04-18 05:44 UTC] morse (David Morse)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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.