From: adigeo@xs4all.nl
Operating system: Linux 2.4.x
PHP version: 4.0.6
PHP Bug Type: dBase related
Bug description: Boolean values from a dbase file are not read corectly
Reading the boolean fields from a dbase database does not work.
I cannot submit a dbase file example but is easy to see whenever your dbase
file has a boolean field the returned field is equal with 0 regardless of
the value of the dbase field.
I used a simple loop to read all records from the dbase file.
$dbf=dbase_open("/tmp/dbase_file", 0));
$num_rows=dbase_numrecords($dbf);
$nf = dbase_numfields($dbf);
while ( $j<$num_rows) {
$k=0;
$rec=dbase_get_record($dbf, $j);
while($k < $nf) {
print "$rec[$k],";
$k++;
}
$j++;
print "<br>";
}
Any boolean value read by dbase_get_record returns 0 which is wrong.
--
Edit bug report at: http://bugs.php.net/?id=13659&edit=1