php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69516 SplFileObject::fputcsv signature has changed
Submitted: 2015-04-23 17:29 UTC Modified: 2015-04-23 18:46 UTC
From: bburnichon at gmail dot com Assigned: salathe (profile)
Status: Closed Package: SPL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2015-04-23 17:29 UTC] bburnichon at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/splfileobject.fputcsv
---

On the page manual, the $escape part is not present. I don't know exactly at which version this behavior appeared,

I have version 5.5.23 on my machine and the added parameter is already there.

After some research, this comes from https://bugs.php.net/bug.php?id=68479 and https://github.com/php/php-src/pull/912

Test script:
---------------
class MySplFileObject extends SplFileObject
{
  public function fputcsv() {}
}

Expected result:
----------------
PHP Strict standards:  Declaration of MySplFileObject::fputcsv() should be compatible with SplFileObject::fputcsv($fields, $delimiter = NULL, $enclosure = NULL) in php shell code on line 4


Actual result:
--------------
PHP Strict standards:  Declaration of MySplFileObject::fputcsv() should be compatible with SplFileObject::fputcsv($fields, $delimiter = NULL, $enclosure = NULL, $escape = NULL) in php shell code on line 4


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-23 18:22 UTC] cmb@php.net
-Status: Open +Status: Analyzed
 [2015-04-23 18:22 UTC] cmb@php.net
The $escape was added in PHP 5.5.21[1] and PHP 5.6.5[2].

[1] <http://php.net/ChangeLog-5.php#5.5.21>
[2] <http://php.net/ChangeLog-5.php#5.6.5>
 [2015-04-23 18:33 UTC] salathe@php.net
-Assigned To: +Assigned To: salathe
 [2015-04-23 18:33 UTC] salathe@php.net
Assigning to myself, since I made the change.
 [2015-04-23 18:45 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=336637
Log: add SplFileObject::fputcsv escape parameter (doc bug #69516)
 [2015-04-23 18:45 UTC] salathe@php.net
-Status: Analyzed +Status: Closed
 [2015-04-23 18:45 UTC] salathe@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2015-04-23 18:46 UTC] salathe@php.net
Gah wrong "quick fix" message again... here's what it should have said:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


And, thanks again!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 14:01:31 2024 UTC