PHP 4.0 Bug #4244: Incorrect dbase_get_record() behavior. Resulting array contains trash.

From: Date: Wed, 26 Apr 2000 08:37:10 +0000
Subject: PHP 4.0 Bug #4244: Incorrect dbase_get_record() behavior. Resulting array contains trash.
Groups: php.dev 
Request: Send a blank email to php-dev+get-18220@lists.php.net to get a copy of this message
From: basil@farpost.com Operating system: Linux 2.2.6 PHP version: 4.0 Release Candidate 1 PHP Bug Type: dBase related Bug description: Incorrect dbase_get_record() behavior. Resulting array contains trash. This code works at PHP 3.0 without problems, but prints trash (every time different trash). <html> <head><title>Transfer from dBase to mySQL</title></head> <body> <? $dbfid = dbase_open("goods.dbf", 0); $rcount = dbase_numrecords($dbfid); for ($i=1; $i <= $rcount; $i++) { $r = dbase_get_record($dbfid, $i); $name = addslashes($r[0]); $size = $r[1]; $price = $r[2]; $picfile = $r[3]; echo "$name $size $price $picfile <br>"; } dbase_close($dbfid); ?> </body> </html> PHP4RC1 configured by ./configure --with-dbase --with-mysql --with-apache=../apache --enable-track-vars

« previous php.dev (#18220) next »