#42261 [Opn->Csd]: header wrong for date field

From: Date: Fri, 10 Aug 2007 00:30:11 +0000
Subject: #42261 [Opn->Csd]: header wrong for date field
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115926@lists.php.net to get a copy of this message
ID: 42261 Updated by: iliaa@php.net Reported By: roberto at spadim dot com dot br -Status: Open +Status: Closed Bug Type: dBase related Operating System: any PHP Version: 5.2.4RC1 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-08-09 22:57:45] spadim at spadim dot com dot br this could be the same problem of bug #27470 ------------------------------------------------------------------------ [2007-08-09 20:01:15] roberto at spadim dot com dot br an dbf file could be get from here: www.spadim.com.br/dbf.dbf ------------------------------------------------------------------------ [2007-08-09 19:26:14] roberto at spadim dot com dot br an dbf file could be get from here: www.spadim.com.br/dbf.dbf ------------------------------------------------------------------------ [2007-08-09 19:04:42] roberto at spadim dot com dot br Description: ------------ sometimes i get 520 size of date field, that's wrong since i can open files on clipper i changed source to set field length to 8 and precision to 0 when type of field is 'D' and it's work, please checkit Reproduce code: --------------- some dbf files have problem Expected result: ---------------- header information of date always be 8 length Actual result: -------------- 520 length in some cases check what i do: dbf_head.c line ~160 switch (dbf->db_type) { case 'N': case 'F': dbf->db_flen = dbfield.dbf_flen[0]; dbf->db_fdc = dbfield.dbf_flen[1]; break; => case 'D': => dbf->db_flen = 8; => break; default: dbf->db_flen = get_short(dbfield.dbf_flen); break; } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42261&edit=1

« previous php.bugs (#115926) next »