|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-27 07:58 UTC] colder@php.net
[2010-04-27 08:01 UTC] colder@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: colder
[2010-04-27 08:01 UTC] colder@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 05:00:02 2025 UTC |
Description: ------------ when subclassing SplFileObject and opening it via SplFileInfo->openFile() initialized array properties of the subclass of SplFileInfo are changing to null, while strings are fine. Test script: --------------- <?php class Foo extends SplFileObject { public $bar = 'baz'; public $bam = array(); function __construct($file) { // do stuff parent::__construct($file); } } $fileInfo = new SplFileInfo('php://temp'); $fileInfo->setFileClass('Foo'); $file = $fileInfo->openFile('r'); print var_dump($file->bar); // is baz print var_dump($file->bam); // is null or UNKNOWN:0 ?> Expected result: ---------------- I expected var_dump($file->bam) to print an empty array Actual result: -------------- null or UNKNOWN:0