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 » File » Bug #5464

fwrite returns false but file checks for -1

Details

Submitted2005-09-20 14:53 UTC
Fromsd at sven-drieling dot de
Assignedmike
StatusClosed
PackageFile
PHP VersionIrrelevant
Roadmaps1.3.0a1

Comments

[2005-09-20 14:53 UTC] sd at sven-drieling dot de

Description:
------------
If an error occurs the fwrite function of PHP returns false but File.php checks for -1.

if (-1 === $bytes = @fwrite($fp, $data, strlen($data))) {
return PEAR::raiseError("Cannot write data: '$data' to file: '$filename'");