1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Commit Graph

6 Commits

Author SHA1 Message Date
David Walker e63febb1c7 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).
2019-02-14 12:50:25 +01:00
Michael Moravec 70668fd88a Fixed typo - inconsistent notice for undefined property (introduced by fix for #49348) 2013-04-10 13:36:47 +08:00
Stanislav Malyshev dc6f073ce9 fix tests 2013-02-18 23:01:42 -08:00
Pierre Joye 6181baf15a - use only test name 2011-08-31 10:22:18 +00:00
Scott MacVicar 6144da7e35 Silently casting an empty string, null or false into an object by adding a property
is pretty non-intuitive. If the same value was 1 or true you get a warning and it halts.

Since we can't break BC completely (yet) lets bump this from E_STRICT.

Also added a new section to UPGRADING for engine changes.

<?php
$x = '';
// $x = null;
// $x = false;
$x->baz = 1;
var_dump($x);

$y = 1;
$y->baz = 1;
var_dump($y);
2010-12-31 16:57:45 +00:00
Dmitry Stogov d868733cc3 Fixed bug #52041 (Memory leak when writing on uninitialized variable returned from function) 2010-06-15 08:22:51 +00:00