File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / bug54323.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:43 2012 UTC (12 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, HEAD
php 5.4.3+patches

--TEST--
Bug #54323 (Accessing unset()'ed ArrayObject's property causes crash)
--FILE--
<?php
class C {
        public $prop = 'C::prop.orig';
}
class MyArrayObject extends ArrayObject {
}
$c = new C;
$ao = new MyArrayObject($c);
testAccess($c, $ao);
function testAccess($c, $ao) {
        foreach ($ao as $key=>$value) {
        }
        unset($ao['prop']);
        var_dump($c->prop, $ao['prop']);
}
--EXPECTF--
Notice: Undefined property: C::$prop in %sbug54323.php on line 14

Notice: Undefined index:  prop in %sbug54323.php on line 14
NULL
NULL

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>