Bug #54290 [Com]: Class which extends from \SplFileObject is not serializable
| From: | jinmoku at hotmail dot com | Date: | Mon, 21 Mar 2011 18:01:42 +0000 |
| Subject: | Bug #54290 [Com]: Class which extends from \SplFileObject is not serializable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159679@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54290&edit=1
ID: 54290
Comment by: jinmoku at hotmail dot com
Reported by: frederic dot hardy at mageekbox dot net
Summary: Class which extends from \SplFileObject is not
serializable
Status: Open
Type: Bug
Package: SPL related
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
see bug :
http://bugs.php.net/bug.php?id=46646
http://svn.php.net/viewvc/php/php-src/trunk/ext/spl/spl_directory.c?r1=271751&r2=271752
;)
Previous Comments:
------------------------------------------------------------------------
[2011-03-17 11:04:21] frederic dot hardy at mageekbox dot net
Description:
------------
It's impossible to implements \Serializable interface on a class which
extends from \SplFileObject.
Test script:
---------------
<?php
namespace php\bugs\splFileObject;
class SerializableFileObject extends \SplFileObject implements
\Serializable
{
public function serialize()
{
}
public function unserialize($serialized)
{
}
}
?>
Expected result:
----------------
Nothing.
Actual result:
--------------
PHP Fatal error: Class php\bugs\splFileObject\Serializable could not
implement interface Serializable in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54290&edit=1