php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79607 Wrong return type
Submitted: 2020-05-16 20:54 UTC Modified: 2020-05-17 10:59 UTC
From: haeckel at dc-solution dot de Assigned: cmb (profile)
Status: Closed Package: SPL related
PHP Version: 7.4.6 OS: Windows 10 Pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: haeckel at dc-solution dot de
New email:
PHP Version: OS:

 

 [2020-05-16 20:54 UTC] haeckel at dc-solution dot de
Description:
------------
---
From manual page: https://php.net/splfileobject.fwrite
---

Documentation states method returns 0 on error, returns false instead.

using production ini with ext: mbstring and ext:openssl enabled

Test script:
---------------
<?php
$file = new SplFileObject(__FILE__);
$exitCode = $file->fwrite('Hallo');
var_dump($exitCode);

Expected result:
----------------
int(0)

Actual result:
--------------
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-16 22:29 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: Filesystem function related +Package: SPL related
 [2020-05-17 10:59 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-05-17 10:59 UTC] cmb@php.net
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.

Fixed with <http://svn.php.net/viewvc?view=revision&revision=349901>.
 [2020-05-17 11:00 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=6683589b3e093a3c45a3ee72051f686af153adec
Log: Fix #79607: Wrong return type
 [2020-05-18 04:40 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=64c2c7746e09fe23ba919e8bd1db1bec84ef7dc5
Log: Fix #79607: Wrong return type
 [2020-12-30 11:59 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=636cf5789080bfb11af22ad14cf185d5005f4846
Log: Fix #79607: Wrong return type
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 08:01:27 2024 UTC