mirror of
https://github.com/php/php-src.git
synced 2024-10-02 07:16:11 +00:00
6144da7e35
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);
31 lines
636 B
PHP
31 lines
636 B
PHP
--TEST--
|
|
Bug #47430 (Errors after writing to nodeValue parameter of an absent previousSibling).
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
$xml = '<?xml
|
|
version="1.0"?><html><p><i>Hello</i></p><p><i>World!</i></p></html>';
|
|
$dom = new DOMDocument();
|
|
$dom->loadXML($xml);
|
|
|
|
$elements = $dom->getElementsByTagName('i');
|
|
foreach ($elements as $i) {
|
|
$i->previousSibling->nodeValue = '';
|
|
}
|
|
|
|
$arr = array();
|
|
$arr[0] = 'Value';
|
|
|
|
print_r($arr);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: 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
|
|
)
|