2010-08-01 21:27:02 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #52484.3 (__set() ignores setting properties with empty names)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
2018-09-17 01:16:42 +08:00
|
|
|
class A {
|
2010-08-01 21:27:02 +08:00
|
|
|
function __get($prop) {
|
|
|
|
var_dump($this->$prop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$a = new A();
|
2016-03-24 01:57:59 +08:00
|
|
|
$prop = "\0";
|
2010-08-01 21:27:02 +08:00
|
|
|
|
|
|
|
var_dump($a->$prop);
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2016-03-24 01:57:59 +08:00
|
|
|
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
|
2015-05-16 03:04:07 +08:00
|
|
|
Stack trace:
|
2016-03-24 01:57:59 +08:00
|
|
|
#0 %s(%d): A->__get('\x00')
|
2015-05-16 03:04:07 +08:00
|
|
|
#1 {main}
|
|
|
|
thrown in %s on line %d
|