PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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