php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76786 invalid session_write_close() return type
Submitted: 2018-08-23 16:55 UTC Modified: 2018-08-24 13:54 UTC
From: szymon at wojdan dot tk Assigned: cmb (profile)
Status: Closed Package: Session related
PHP Version: 7.0.31 OS: Any
Private report: No CVE-ID: None
 [2018-08-23 16:55 UTC] szymon at wojdan dot tk
Description:
------------
Documentation for session_write_close() states that it returns boolean value but according to this https://github.com/php/php-src/commit/7f196e321 this statement is true only for version >= 7.2. For earlier versions this function returns nothing. I assume reference to return value should specify that earlier versions don't return anything and that boolean return value is available for versions 7.2 and higher.

Test script:
---------------
// for php versions before 7.2
session_start();
$result = session_write_close();
var_dump($result); 

Expected result:
----------------
<script_name>:<line>:boolean true


Actual result:
--------------
<script_name>:<line>:null


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-23 18:06 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: Session related -Assigned To: +Assigned To: cmb
 [2018-08-24 02:28 UTC] yohgaki@php.net
https://github.com/php/php-src/blob/PHP-7.2/UPGRADING#L67
Sorry, it's only in UPGRADING. I'm not sure why it's not properly documented.
 [2018-08-24 13:54 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=345551
Log: Fix #76786: invalid session_write_close() return type

Adding respective changelog entries, as usual, should be sufficient.
 [2018-08-24 13:54 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2018-08-24 13:54 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.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=d7e3cfca387b240afa12f9047fafc125a79ad706
Log: Fix #76786: invalid session_write_close() return type
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 11 06:01:27 2024 UTC