ID:               49450
 User updated by:  arnold at adaniels dot nl
 Reported By:      arnold at adaniels dot nl
 Status:           Bogus
 Bug Type:         Reproducible crash
 Operating System: Linux / Ubuntu 9.04
 PHP Version:      5.3.0
 New Comment:

The PHP bugs app resulted in 'Authentication failed' and appeared not
to have submitted the bug. Therefor I pressed 'Submit' again. I didn't
get the confirmed page until I cleared my cookies.


Previous Comments:
------------------------------------------------------------------------

[2009-09-03 10:42:19] der...@php.net

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

49449

------------------------------------------------------------------------

[2009-09-03 10:33:46] 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



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49450&edit=1

Reply via email to