mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
df79277de3
This reverts commit bb43a3822e
.
After thinking about this a bit more, this is now going to be
a complete solution for the "readonly properties" case, for example:
unset($foo->readOnly->bar);
should also be legal and
$foo->readOnly['bar'] = 42;
should also be legal if $foo->readOnly is not an array but an
ArrayAccess object.
I think it may be better to distinguish better on the BP_VAR flag
level. Reverting for now.
15 lines
288 B
PHP
15 lines
288 B
PHP
--TEST--
|
|
Bug #41919 (crash in string to array conversion)
|
|
--FILE--
|
|
<?php
|
|
$foo="50";
|
|
$foo[3]->bar[1] = "bang";
|
|
|
|
echo "ok\n";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Cannot use string offset as an object in %sbug41919.php:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %sbug41919.php on line %d
|