1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Files
DanielEScherzer bce1f4aeb1 Zend/tests: organize some tests with sub directories (3) (#16444)
First pass at moving `Zend/tests/bug*` tests to existing sub directories

Work towards GH-15631
2025-02-10 00:35:51 +00:00

67 lines
2.2 KiB
PHP

--TEST--
Bug #43201 (Crash on using uninitialized 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
Warning: Undefined variable $ref in %s on line %d
Warning: Undefined variable $undef in %s on line %d
Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
Warning: Undefined variable $undef in %s on line %d
Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
Warning: Undefined variable $undef in %s on line %d
Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
Warning: Undefined variable $undef in %s on line %d
Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
Warning: Undefined variable $undef in %s on line %d
Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
Warning: Undefined variable $undef in %s on line %d
Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
ok