php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80251 session_cache_expire() expects int
Submitted: 2020-10-17 15:14 UTC Modified: 2020-12-09 12:57 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: a dot vysotsky at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Session related
PHP Version: PHP 8 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
20 - 16 = ?
Subscribe to this entry?

 
 [2020-10-17 15:14 UTC] a dot vysotsky at gmail dot com
Description:
------------
---
From manual page: https://php.net/function.session-cache-expire
---

Fail input parameter type: "string" given, "int" must be.

P.S.: Don't need to select "PHP version" for documentation problem on bug report page.

P.S.2: Rename, please, "short description" to "summary" in error message "You must supply a short description of the bug you are reporting" on bug report page.


Test script:
---------------
session_cache_expire ([ string $new_cache_expire ] ) : int



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-17 15:35 UTC] cmb@php.net
-Summary: Fail input parameter type for session function +Summary: session_cache_expire() expects int -Status: Open +Status: Verified -Package: Unknown/Other Function +Package: Session related -PHP Version: master-Git-2020-10-17 (Git) +PHP Version: PHP 8
 [2020-10-17 15:35 UTC] cmb@php.net
Prior to PHP 8.0.0, session_cache_expire() actually expected a
string (whereas type juggling took place even in script_types
mode). Only as of PHP 8.0.0, the parameter is of type int.

> Don't need to select "PHP version" for documentation problem on
> bug report page.

This is why there is the option to choose "Irrelevant".  And in
this case the docs are even depending on the PHP version.

> Rename, please, "short description" to "summary" in error
> message "You must supply a short description of the bug you are
> reporting" on bug report page.

If you feel strongly about this, please open another bug report.
Also consider to submit a pull request[1].

[1] <https://github.com/php/web-bugs/pulls>
 [2020-12-09 12:57 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-12-09 12:57 UTC] cmb@php.net
> Prior to PHP 8.0.0, session_cache_expire() actually expected a
> string […]

Not really.

Anyhow, the docs have been fixed in the meantime, so closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC