mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
* Fix type confusion and parent reference * Manually manage the lifetime of the parent * Add regression tests * Break out to a helper, and apply the use-after-free fix to xpath Closes GH-11402.
34 lines
681 B
PHP
34 lines
681 B
PHP
--TEST--
|
|
Bug #78577 (Crash in DOMNameSpace debug info handlers)
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
|
|
$doc = new DOMDocument;
|
|
$doc->loadXML('<foo xmlns="http://php.net/test" xmlns:foo="urn:foo" />');
|
|
|
|
$attr = $doc->documentElement->getAttributeNode('xmlns');
|
|
var_dump($attr);
|
|
|
|
?>
|
|
--EXPECT--
|
|
object(DOMNameSpaceNode)#3 (8) {
|
|
["nodeName"]=>
|
|
string(5) "xmlns"
|
|
["nodeValue"]=>
|
|
string(19) "http://php.net/test"
|
|
["nodeType"]=>
|
|
int(18)
|
|
["prefix"]=>
|
|
string(0) ""
|
|
["localName"]=>
|
|
string(5) "xmlns"
|
|
["namespaceURI"]=>
|
|
string(19) "http://php.net/test"
|
|
["ownerDocument"]=>
|
|
string(22) "(object value omitted)"
|
|
["parentNode"]=>
|
|
string(22) "(object value omitted)"
|
|
}
|