Bug #65019 [Opn->Nab]: SplFixedArray: Notice with array push

From: Date: Thu, 27 Mar 2014 00:25:49 +0000
Subject: Bug #65019 [Opn->Nab]: SplFixedArray: Notice with array push
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184909@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65019&edit=1 ID: 65019 Updated by: levim@php.net Reported by: dflorent dot pokap at gmail dot com Summary: SplFixedArray: Notice with array push -Status: Open +Status: Not a bug Type: Bug Package: SPL related Operating System: Linux 3.5.0-17-generic -PHP Version: 5.4.16 +PHP Version: 5.4+ -Assigned To: +Assigned To: levim Block user comment: N Private report: N New Comment: Basically it's doing a push to a copy of the object; you would need to work with references which SplFixedArray doesn't support (and I don't think we should add). Previous Comments: ------------------------------------------------------------------------ [2013-06-12 18:07:21] dflorent dot pokap at gmail dot com Description: ------------ When I want to push an element in an array item of SplFixedArray, I get an error notice. Tested on 5.4.6-1ubuntu1.2. Test script: --------------- $a = new SplFixedArray(1); $a[0] = array(); array_push($a[0], 'test'); Actual result: -------------- Notice: Indirect modification of overloaded element of SplFixedArray has no effect ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65019&edit=1

« previous php.bugs (#184909) next »