PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File System » VFS » Bug #2298

Error when writing empty file to FS

Details

Submitted2004-09-07 14:41 UTC
FromLars_hh at gmx dot de
Assignedchagenbu
StatusClosed
PackageVFS
PHP Version4.3.8
OSSuse 9.0
Roadmaps(Not assigned)

Comments

[2004-09-07 14:41 UTC] Lars_hh at gmx dot de

Description:
------------
When passing an empty Data string to the writeData() function using the file driver an error is risen. PHP's fwrite() reports 0 bytes written which is interpreted as an error.

if (@fwrite($fp, $data) == -1) {
return PEAR::raiseError(_("Unable to write VFS file data."));
}

corrects the problem.

Reproduce code:
---------------
@see description

Expected result:
----------------
@see description

Actual result:
--------------
@see description