From: tobwen at gmx dot de Operating system: Linux, win32 PHP version: 5.2.4 PHP Bug Type: dBase related Bug description: empty fields get zeroed
Description: ------------ The dBase-extension, which is bundled with PHP, fills empty dBase-fields with a zero. Reproduce code: --------------- <?php $db = @dbase_open('test.dbf', READ_ONLY); print "<pre>\n"; for ($i = 1; $i <= dbase_numrecords($db); $i++) { $row = dbase_get_record($db, $i); printf("%7d: %s\n", $i, join('|', $row)); } print "</pre>\n"; dbase_close($db); ?> Expected result: ---------------- Access, Office 2003 and various dBase-readers can read those fields and leave them empty. Right now, you can't differ "real" zero entries from empty entries :-( Actual result: -------------- Fields, which are empty (not marked as deleted) are filled with zeros. -- Edit bug report at http://bugs.php.net/?id=42885&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42885&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42885&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42885&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42885&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42885&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42885&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42885&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42885&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42885&r=support Expected behavior: http://bugs.php.net/fix.php?id=42885&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42885&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42885&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42885&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42885&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42885&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42885&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42885&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42885&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42885&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42885&r=mysqlcfg