From:             c dot ferrari at gmx dot net
Operating system: Windows XP
PHP version:      4.3.2RC1
PHP Bug Type:     *General Issues
Bug description:  Wrong output with funtion fwrite(), fputs()

Since PHP version 4.3.1 an also in version 4.3.2RC1 I have found some
problems with the function fputs() fwrite().
If you write only one character the functinon write two!!
Example 1:
<?php
$fp=fopen("test.txt","w+");
fputs($fp, "*");
fclose($fp);
?>
Result:
With a Hexeditor you can see 2A 0A.

Example 2:
<?php
$fp=fopen("test.txt","w+");
fputs($fp, "**");
fclose($fp);
?>
Result:
With a Hexeditor you can see the correct result  2A 2A.


-- 
Edit bug report at http://bugs.php.net/?id=23014&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23014&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23014&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23014&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23014&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23014&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23014&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23014&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23014&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23014&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23014&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23014&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23014&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23014&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23014&r=gnused

Reply via email to