diff options
| author | David Walker <dave@mudsite.com> | 2018-02-14 22:06:34 -0700 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-14 12:50:25 +0100 |
| commit | e63febb1c772e15c1da891f00e3a343090e43c67 (patch) | |
| tree | 995c82b1627d266332e6cf1dfa8eca8cfce7c2a2 /ext/simplexml | |
| parent | dab54624842e76350bb6f5e71a8ef0f53ed34630 (diff) | |
| download | php-git-e63febb1c772e15c1da891f00e3a343090e43c67.tar.gz | |
Fixed bug #75921
Ensure that the "creating default object from empty value" warning is
always thrown. Previously some cases were missing the warning, in
particular those going through FETCH_OBJ_W rather than a dedicated
opcode (like ASSIGN_OBJ).
One slightly unfortunate side-effect of this change is that something
like $a->b->c = 'd' will now generate two warnings rather than one
when $a is null (one for property b, one for property c).
Diffstat (limited to 'ext/simplexml')
| -rw-r--r-- | ext/simplexml/tests/bug36611.phpt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/simplexml/tests/bug36611.phpt b/ext/simplexml/tests/bug36611.phpt index eb202671ca..d9c2a049b5 100644 --- a/ext/simplexml/tests/bug36611.phpt +++ b/ext/simplexml/tests/bug36611.phpt @@ -14,17 +14,19 @@ $xml_str = <<<EOD </c_fpobel> EOD; -$xml = simplexml_load_string ($xml_str) ; +$xml = simplexml_load_string($xml_str); $val = 1; var_dump($val); $zml->pos["act_idx"] = $val; -var_dump($val) ; +var_dump($val); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- int(1) + +Warning: Creating default object from empty value in %sbug36611.php on line 17 int(1) ===DONE=== |
