File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug43201.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (12 years, 4 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
Bug #43201 (Crash on using unitialized vals and __get/__set)
--FILE--
<?php
class Foo {
	function __get($k) {
		return null;
	}
	function __set($k, $v) {
		$this->$k = $v;
	}
}

$c = new Foo();

$c->arr[0]["k"] = 1;
$c->arr[0]["k2"] = $ref;
for($cnt=0;$cnt<6;$cnt++) {
	$ref = chop($undef);	
	$c->arr[$cnt]["k2"] = $ref;
}
echo "ok\n";
?>
--EXPECTF--
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 13

Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 14

Notice: Undefined variable: ref in %sbug43201.php on line 14

Notice: Undefined variable: undef in %sbug43201.php on line 16

Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17

Notice: Undefined variable: undef in %sbug43201.php on line 16

Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17

Notice: Undefined variable: undef in %sbug43201.php on line 16

Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17

Notice: Undefined variable: undef in %sbug43201.php on line 16

Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17

Notice: Undefined variable: undef in %sbug43201.php on line 16

Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17

Notice: Undefined variable: undef in %sbug43201.php on line 16

Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
ok

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