Edit report at http://bugs.php.net/bug.php?id=50770&edit=1
ID: 50770 Comment by: kp at kll dot pl Reported by: sergio at entrecables dot com Summary: Incorrect date and boolean lengths when writing header Status: Open Type: Bug Package: dBase related Operating System: * PHP Version: 5.*, 6 Block user comment: N New Comment: Thanks for sergio at entrecables dot com I have added patch which works well. Im surprised that it is not solved yet. Developers please add this patch into buggy source! Previous Comments: ------------------------------------------------------------------------ [2010-01-15 16:22:58] sergio at entrecables dot com I'm pasting the patch here because I can't see how to upload files Index: dbf_head.c =================================================================== --- dbf_head.c (revisi�n: 293584) +++ dbf_head.c (copia de trabajo) @@ -200,9 +200,11 @@ break; case 'D': dbf->db_flen = 8; + put_short(dbfield.dbf_flen, dbf->db_flen); break; case 'L': dbf->db_flen = 1; + put_short(dbfield.dbf_flen, dbf->db_flen); break; default: put_short(dbfield.dbf_flen, dbf->db_flen); ------------------------------------------------------------------------ [2010-01-15 16:20:50] sergio at entrecables dot com Description: ------------ Rev 246377 (http://svn.php.net:80/viewvc?view=revision&revision=246377) in PECL repository breaks writting dbase header with date or boolean fields, because skip setting dbfield.dbf_flen Adding "put_short(dbfield.dbf_flen, dbf->db_flen);" after setting dbf->db_flen fixes it. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=50770&edit=1