[php-src] master: Merge branch 'PHP-8.6'

From: Date: Thu, 26 Nov 2026 05:00:52 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-144203@lists.php.net to get a copy of this message
Author: David Carlier (devnexen) Date: 2026-11-26T04:59:22Z Commit: https://github.com/php/php-src/commit/e6707b5c6e66fc3c1ce6dda04cd4b2fc6791a6c7 Raw diff: https://github.com/php/php-src/commit/e6707b5c6e66fc3c1ce6dda04cd4b2fc6791a6c7.diff Merge branch 'PHP-8.6' * PHP-8.6: ext/dom: fix Dom\Notation publicId and systemId property handlers Changed paths: A ext/dom/tests/modern/xml/Notation_properties.phpt M ext/dom/php_dom.c M ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt Diff: diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 2f9cebe700a0..84b9f69e3c23 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1261,7 +1261,7 @@ PHP_MINIT_FUNCTION(dom) DOM_REGISTER_PROP_HANDLER(&dom_modern_notation_prop_handlers, "publicId", dom_notation_public_id_read, NULL); DOM_REGISTER_PROP_HANDLER(&dom_modern_notation_prop_handlers, "systemId", dom_notation_system_id_read, NULL); zend_hash_merge(&dom_modern_notation_prop_handlers, &dom_modern_node_prop_handlers, NULL, false); - zend_hash_add_new_ptr(&classes, dom_modern_notation_class_entry->name, &dom_modern_node_prop_handlers); + zend_hash_add_new_ptr(&classes, dom_modern_notation_class_entry->name, &dom_modern_notation_prop_handlers); dom_entity_class_entry = register_class_DOMEntity(dom_node_class_entry); dom_entity_class_entry->create_object = dom_objects_new; diff --git a/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt b/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt index 4ac15a029e37..c7ec88f077a8 100644 --- a/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt +++ b/ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt @@ -141,7 +141,11 @@ object(Dom\Entity)#3 (17) { ["textContent"]=> NULL } -object(Dom\Notation)#4 (14) { +object(Dom\Notation)#4 (16) { + ["publicId"]=> + string(0) "" + ["systemId"]=> + string(11) "viewgif.exe" ["nodeType"]=> int(12) ["nodeName"]=> diff --git a/ext/dom/tests/modern/xml/Notation_properties.phpt b/ext/dom/tests/modern/xml/Notation_properties.phpt new file mode 100644 index 000000000000..0a07c1c3e6a7 --- /dev/null +++ b/ext/dom/tests/modern/xml/Notation_properties.phpt @@ -0,0 +1,23 @@ +--TEST-- +Dom\XMLDocument: Dom\Notation publicId and systemId properties +--EXTENSIONS-- +dom +--FILE-- +<?php +$xml = <<<'XML' +<!DOCTYPE r [ + <!NOTATION image PUBLIC "-//Example//EN" "image.dat"> + <!ELEMENT r EMPTY> +]> +<r/> +XML; + +$doc = Dom\XMLDocument::createFromString($xml); +$notation = $doc->doctype->notations->getNamedItem('image'); + +var_dump($notation->publicId); +var_dump($notation->systemId); +?> +--EXPECT-- +string(14) "-//Example//EN" +string(9) "image.dat"

« previous php.cvs (#144203) next »