summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2010-12-31 16:57:45 (GMT)
committerScott MacVicar <scottmac@php.net>2010-12-31 16:57:45 (GMT)
commit6144da7e351545158db3fad647b818b1027354f7 (patch)
treefc988d0b79b3385551482b0f0ca071763a4b8114 /ext
parentc9c0de49a8f56b940a4d2142408f19f1f1821f7d (diff)
downloadphp-6144da7e351545158db3fad647b818b1027354f7.tar.gz
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);
Diffstat (limited to 'ext')
-rw-r--r--ext/dom/tests/bug47430.phpt4
-rw-r--r--ext/reflection/tests/bug40431.phpt4
2 files changed, 3 insertions, 5 deletions
diff --git a/ext/dom/tests/bug47430.phpt b/ext/dom/tests/bug47430.phpt
index d3ca435..243fe84 100644
--- a/ext/dom/tests/bug47430.phpt
+++ b/ext/dom/tests/bug47430.phpt
@@ -21,9 +21,9 @@ print_r($arr);
?>
--EXPECTF--
-Strict Standards: Creating default object from empty value in %s on line %d
+Warning: Creating default object from empty value in %s on line %d
-Strict Standards: Creating default object from empty value in %s on line %d
+Warning: Creating default object from empty value in %s on line %d
Array
(
[0] => Value
diff --git a/ext/reflection/tests/bug40431.phpt b/ext/reflection/tests/bug40431.phpt
index 6e6e4c5..863df7a 100644
--- a/ext/reflection/tests/bug40431.phpt
+++ b/ext/reflection/tests/bug40431.phpt
@@ -4,7 +4,7 @@ Bug #40431 (dynamic properties may cause crash in ReflectionProperty methods)
<?php
echo "=== 1st test ===\n";
-
+$Obj = new stdClass;
$Obj->value = 'value';
$RefObj = new ReflectionObject($Obj);
@@ -78,8 +78,6 @@ echo "Done\n";
?>
--EXPECTF--
=== 1st test ===
-
-Strict Standards: Creating default object from empty value in %s on line %d
array(1) {
[0]=>
&object(ReflectionProperty)#%d (2) {