|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-08-05 16:17 UTC] widman-php at cardiothink dot com
[2001-08-05 16:18 UTC] andy@php.net
[2001-08-05 16:18 UTC] andy@php.net
[2001-08-06 00:50 UTC] sniper@php.net
[2001-08-14 07:02 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 03:00:01 2025 UTC |
Below are patches that fix the problem reported 10/20/2000 in bug report #7374. The problem is that when boolean (TRUE or FALSE) fields are present in an imported Dbase file, the value is always imported as FALSE (0). This problem has been present since 4.0.3. The patches below were generated using distribution 4.0.6. 466,467c466 < case 'N': /* FALLS THROUGH */ < case 'L': /* FALLS THROUGH */ --- > case 'N': 473a473,486 > case 'L': /* we used to FALLS THROUGH, but now we check for T/Y and F/N > and insert 1 or 0, respectively. db_fdc is the number of > decimals, which we don't care about. 3/14/01 LEW */ > if ( (*str_value == 'T') || ( *str_value == 'Y' ) ){ > add_next_index_long(return_value, strtol("1", NULL, 10)); > } else { > if ( (*str_value == 'F') || ( *str_value == 'N' ) ){ > add_next_index_long(return_value, strtol("0", NULL, 10)); > } > else { > add_next_index_long(return_value, strtol(" ", NULL, 10)); > } > } > break; 544,545c557 < case 'N': /* FALLS THROUGH */ < case 'L': /* FALLS THROUGH */ --- > case 'N': 551a564,578 > case 'L': /* we used to FALLS THROUGH, but now we check for T/Y and F/N > and insert 1 or 0, respectively. db_fdc is the number of > decimals, which we don't care about. 3/14/01 LEW */ > if ( (*str_value == 'T') || ( *str_value == 'Y') ){ > add_assoc_long(return_value, cur_f->db_fname, strtol("1", NULL, 10)); > } else { > if ( (*str_value == 'F') || ( *str_value == 'N' ) ){ > add_assoc_long(return_value, cur_f->db_fname,strtol("0", NULL, 10)); > } > else { > add_assoc_long(return_value, cur_f->db_fname,strtol(" ", NULL, 10)); > } > } > break; >