php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61330 Typo in session_set_save_handler example#2
Submitted: 2012-03-08 19:15 UTC Modified: 2012-03-08 21:55 UTC
From: jlefaive at gmail dot com Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2012-03-08 19:15 UTC] jlefaive at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.session-set-save-handler
---
The write() method in example #2 has a typo.

>>function write($id, $data){
>>      return file_put_contents("$savePath/sess_$id", $data) === false ? false 
: true;
>>}

should be:
function write($id, $data){
        return file_put_contents("$this->savePath/sess_$id", $data) === false ? 
false : true;
    }
// missing "this->" in call to file_put_contents


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-08 21:53 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=324030
Log: fixed wrong variable name in session handler examples (doc #61330)
 [2012-03-08 21:55 UTC] salathe@php.net
-Status: Open +Status: Closed -Package: *General Issues +Package: Documentation problem -Assigned To: +Assigned To: salathe
 [2012-03-08 21:55 UTC] salathe@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.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 05:00:01 2026 UTC