|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-09-03 10:33 UTC] arnold at adaniels dot nl
Description:
------------
Using array access on $this in ArrayObject::offsetSet() causes a segmentation fault.
(Calling parent::offsetSet() instead, works fine)
Reproduce code:
---------------
class AOTest extends ArrayObject
{
public function offsetSet($index, $newval)
{
$this[$index] = (int)$newval;
}
}
$a = new AOTest();
$a['test'] = "10 doves";
var_dump((array)$a);
Expected result:
----------------
array(1) {
["test"]=>
int(10)
}
Actual result:
--------------
Segmentation fault
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 07:00:01 2025 UTC |
I think I got it with the option to save the bug's password in a cookie ('remember for the next time' or something).