Doc #69516 [Ana->Csd]: SplFileObject::fputcsv signature has changed

From: Date: Thu, 23 Apr 2015 18:45:26 +0000
Subject: Doc #69516 [Ana->Csd]: SplFileObject::fputcsv signature has changed
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12242@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69516&edit=1 ID: 69516 Updated by: salathe@php.net Reported by: bburnichon at gmail dot com Summary: SplFileObject::fputcsv signature has changed -Status: Analyzed +Status: Closed Type: Documentation Problem Package: SPL related PHP Version: Irrelevant Assigned To: salathe Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2015-04-23 18:45:03] 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:33:21] salathe@php.net Assigning to myself, since I made the change. ------------------------------------------------------------------------ [2015-04-23 18:22:44] 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 17:29:35] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69516&edit=1

« previous php.doc.bugs (#12242) next »