php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42885 empty fields get zeroed
Submitted: 2007-10-08 01:41 UTC Modified: 2007-11-27 01:00 UTC
From: tobwen at gmx dot de Assigned:
Status: No Feedback Package: dBase related
PHP Version: 5.2.4 OS: Linux, win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tobwen at gmx dot de
New email:
PHP Version: OS:

 

 [2007-10-08 01:41 UTC] tobwen at gmx dot de
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC