Edit report at http://bugs.php.net/bug.php?id=50770&edit=1

 ID:                 50770
 Updated by:         fel...@php.net
 Reported by:        sergio at entrecables dot com
 Summary:            Incorrect date and boolean lengths when writing
                     header
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            dBase related
 Operating System:   *
 PHP Version:        5.*, 6
-Assigned To:        
+Assigned To:        alan_k
 Block user comment: N

 New Comment:

Already fixed in the PECL repository.

http://svn.php.net/viewvc?view=revision&revision=304302


Previous Comments:
------------------------------------------------------------------------
[2010-09-28 13:42:06] kp at kll dot pl

Oh.. 

This bug (and patch) is related with PHP 5.3.2 and earlier 5.3 versions.

------------------------------------------------------------------------
[2010-09-28 13:34:52] kp at kll dot pl

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!

------------------------------------------------------------------------
[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

Reply via email to