Annotation of embedaddon/php/ext/dom/tests/bug47430.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #47430 (Errors after writing to nodeValue parameter of an absent previousSibling).
3: --SKIPIF--
4: <?php require_once('skipif.inc'); ?>
5: --FILE--
6: <?php
7: $xml = '<?xml
8: version="1.0"?><html><p><i>Hello</i></p><p><i>World!</i></p></html>';
9: $dom = new DOMDocument();
10: $dom->loadXML($xml);
11:
12: $elements = $dom->getElementsByTagName('i');
13: foreach ($elements as $i) {
14: $i->previousSibling->nodeValue = '';
15: }
16:
17: $arr = array();
18: $arr[0] = 'Value';
19:
20: print_r($arr);
21:
22: ?>
23: --EXPECTF--
24: Strict Standards: Creating default object from empty value in %s on line %d
25:
26: Strict Standards: Creating default object from empty value in %s on line %d
27: Array
28: (
29: [0] => Value
30: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>