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 » PHP » PHP_Compat » Bug #4385

spelling mistake, minor errors in file_put_contents.php

Details

Submitted2005-05-19 02:19 UTC
Fromjasper at bryant-greene dot name
Assignedaidan
StatusClosed
PackagePHP_Compat
PHP VersionIrrelevant
OSN/A
Roadmaps(Not assigned)

Comments

[2005-05-19 02:19 UTC] jasper at bryant-greene dot name

Description:
------------
In the PHP_Compat package, file_put_contents.php contains the following (minor) mistakes:

This:

// Get the length of date to write
$length = strlen($content);

Should probably be:

// Get the length of data to write
$length = strlen($content);

---

Also:

// Check what mode we are using
$mode = ($flags & FILE_APPEND) ? $mode = 'a' : $mode = 'w';

Correct me if I'm wrong, but couldn't that just be:

// Check what mode we are using
$mode = ($flags & FILE_APPEND) ? 'a' : 'w';