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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 09:01:23 2020 UTC