Annotation of embedaddon/php/Zend/tests/bug43201.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #43201 (Crash on using unitialized vals and __get/__set)
! 3: --FILE--
! 4: <?php
! 5: class Foo {
! 6: function __get($k) {
! 7: return null;
! 8: }
! 9: function __set($k, $v) {
! 10: $this->$k = $v;
! 11: }
! 12: }
! 13:
! 14: $c = new Foo();
! 15:
! 16: $c->arr[0]["k"] = 1;
! 17: $c->arr[0]["k2"] = $ref;
! 18: for($cnt=0;$cnt<6;$cnt++) {
! 19: $ref = chop($undef);
! 20: $c->arr[$cnt]["k2"] = $ref;
! 21: }
! 22: echo "ok\n";
! 23: ?>
! 24: --EXPECTF--
! 25: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 13
! 26:
! 27: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 14
! 28:
! 29: Notice: Undefined variable: ref in %sbug43201.php on line 14
! 30:
! 31: Notice: Undefined variable: undef in %sbug43201.php on line 16
! 32:
! 33: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
! 34:
! 35: Notice: Undefined variable: undef in %sbug43201.php on line 16
! 36:
! 37: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
! 38:
! 39: Notice: Undefined variable: undef in %sbug43201.php on line 16
! 40:
! 41: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
! 42:
! 43: Notice: Undefined variable: undef in %sbug43201.php on line 16
! 44:
! 45: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
! 46:
! 47: Notice: Undefined variable: undef in %sbug43201.php on line 16
! 48:
! 49: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
! 50:
! 51: Notice: Undefined variable: undef in %sbug43201.php on line 16
! 52:
! 53: Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
! 54: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>