php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36359 splFileObject: fwrite does not write
Submitted: 2006-02-10 17:42 UTC Modified: 2006-02-10 17:58 UTC
From: php-work at yandex dot ru Assigned:
Status: Closed Package: SPL related
PHP Version: 5CVS-2006-02-10 (snap) OS: Linux (CentOS 4.2)
Private report: No CVE-ID:
 [2006-02-10 17:42 UTC] php-work at yandex dot ru
Description:
------------
splFileObject->fwrite() does not write

Reproduce code:
---------------
> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 0 Feb 10 19:25 foo.txt*

<?php
$file = new SplFileObject('foo.txt', 'w');
$file->fwrite('text123');
?>

Expected result:
----------------
> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 8 Feb 10 19:25 foo.txt*

> cat foo.txt
text123

Actual result:
--------------
> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 0 Feb 10 19:25 foo.txt*

> cat foo.txt

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-10 17:58 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 13:02:46 2014 UTC