ID:               42125
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kraghuba at in dot ibm dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Windows XP
 PHP Version:      6CVS-2007-07-27 (snap)
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php6.0-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php6.0-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2007-07-27 11:54:16] kraghuba at in dot ibm dot com

Description:
------------
fgetss() read an extra char from a file which is created using
file_put_content() function.

This problem is noticed only on php6 with unicode ON.

Reproduce code:
---------------
<?php
$data = <<<EOT
<test>Testing fgetss() functions</test>
test
EOT;

$filename = "test.txt";
file_put_contents($filename, $data);
$fp = fopen($filename, "r");
var_dump( fgetss($fp) );
fclose($fp);
?>

Expected result:
----------------
int(44)
string(27) "Testing fgetss() functions
"

Actual result:
--------------
string(28) "Testing fgetss() functions
"


------------------------------------------------------------------------


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

Reply via email to