|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-11-02 18:42 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2016-11-02 18:55 UTC] cmb@php.net
[2016-11-02 19:08 UTC] cmb@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jan 02 00:00:02 2026 UTC |
Description: ------------ If a float value is written to a character field ('C') all decimals are discarded, and only the integral part of the number is written. Also, the number is right padded to the field length. This regression has been introduced by fixing bug #39305. Test script: --------------- <?php $filename = __DIR__ . DIRECTORY_SEPARATOR . 'dbase-trunc.dbf'; $db = dbase_create($filename, [['FLOAT', 'C', 15]]); dbase_add_record($db, [123.45]); var_dump(dbase_get_record_with_names($db, 1)); Expected result: ---------------- array(2) { ["FLOAT"]=> string(15) "123.45 " ["deleted"]=> int(0) } Actual result: -------------- array(2) { ["FLOAT"]=> string(15) " 123" ["deleted"]=> int(0) }