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

Bug #616 Warning: Undefined index: autofree in DB.php (when doing a query)
Submitted: 2004-01-24 10:43 UTC
From: pear-01 at oliverklee dot de Assigned: danielc
Status: Bogus Package: DB
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-01-24 10:43 UTC] pear-01 at oliverklee dot de
Description: ------------ (Using PHP 4.2.2 and mySQL 3.23 that came with RedHat 9 and PEAR-DB 1.5.0rc2.) When doing a simple SELECT * query with error_reporting(E_ALL), I get the following warning: Notice: Undefined index: autofree in /home/klee/public_html/i2brain/version-02/include/pear/DB.php on line 697 Line 697 is the following line in the function DB_result: $this->autofree = $dbh->options['autofree']; Reproduce code: --------------- $dsn = "mysql://$DB_USER:$DB_PASS@localhost/$DB_NAME"; $db = DB :: connect($dsn); $queryResult = $db -> query('SELECT * FROM visitors'); $entries = $queryResult -> numRows(); echo 'Number of entries: '.$entries."\n"; $db -> disconnect(); Expected result: ---------------- Number of entries: 44 Actual result: -------------- Notice: Undefined index: autofree in /home/klee/public_html/i2brain/version-02/include/pear/DB.php on line 697 Number of entries: 44

Comments

 [2004-01-25 00:00 UTC] danielc
I haven't come across this bug during my extensive testing. I suspect it has already been fixed. You can update your version of DB from CVS or wait a few days and there will be an official new release.