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

From: Date: Thu, 26 Nov 2026 05:00:47 +0000
Subject: [php-src] master: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-144202@lists.php.net to get a copy of this message
Author: David Carlier (devnexen) Date: 2026-11-26T04:59:20Z Commit: https://github.com/php/php-src/commit/ec124ff937d1d237ee1100faa974ba829f0d2edd Raw diff: https://github.com/php/php-src/commit/ec124ff937d1d237ee1100faa974ba829f0d2edd.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: ext/dom: fix Dom\Notation publicId and systemId property handlers # Conflicts: # ext/dom/tests/modern/xml/DTDNamedNodeMap.phpt 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 0833d9a3c9be..efa47c5c31a8 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 (#144202) next »