php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54641 splfileinfo aborts connection when added to session
Submitted: 2011-04-30 23:20 UTC Modified: 2011-05-01 12:59 UTC
From: alex at phpguide dot co dot il Assigned:
Status: Not a bug Package: SPL related
PHP Version: 5.3.6 OS: windows 7
Private report: No CVE-ID: None
 [2011-04-30 23:20 UTC] alex at phpguide dot co dot il
Description:
------------
Attempting to put SplFileInfo into session
results in Connection Was Reset

Test script:
---------------
<?php
session_start();
$_SESSION['dying connection'] = new SplFileInfo(__FILE__);

Actual result:
--------------
Connection was reset

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-30 23:24 UTC] alex at phpguide dot co dot il
seems like
Uncaught exception 'Exception' with message 'Serialization of 'SplFileInfo' is not allowed'
has to be related.

Should be documented somewhere somehow :/

Yet as another bug: unserializable objects lead to unexpected results when put in session instead of producing any warning or exception.
 [2011-04-30 23:34 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2011-04-30 23:34 UTC] pajoye@php.net
No bug here, it is not allowed nor supported to serialize SplFileInfo instances.
 [2011-05-01 12:51 UTC] alex at phpguide dot co dot il
Would be lovely to have any warning saying that
when the system attempts to perform serialization for objects not supporting that
 [2011-05-01 12:59 UTC] pajoye@php.net
SPL raises exception, catching them sounds like a good plan.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC