summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2010-04-09 11:34:34 +0000
committerRob Richards <rrichards@php.net>2010-04-09 11:34:34 +0000
commitf53f94d24d1df0656326a9413945c88138cf9c7a (patch)
treec0ed387384b826146c2006edaa176f36bddf9780
parentdda73e99f2e858aa1a0335d20f416fe40e4af7b1 (diff)
downloadphp-git-f53f94d24d1df0656326a9413945c88138cf9c7a.tar.gz
fix bug #50828 (DOMNotation is not subclass of DOMNode)
-rw-r--r--NEWS1
-rw-r--r--ext/dom/php_dom.c7
2 files changed, 3 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 44aabb6fde..0bc7fbb94c 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,7 @@ PHP NEWS
- Fixed bug #51023 (filter doesn't detect int overflows with GCC 4.4).
(Raphael Geissert)
- Fixed bug #50999 (unaligned memory access in dba_fetch()). (Felipe)
+- Fixed bug #50828 (DOMNotation is not subclass of DOMNode). (Rob)
- Fixed bug #50810 (property_exists does not work for private). (Felipe)
- Fixed bug #50731 (Inconsistent namespaces sent to functions registered with
spl_autoload_register). (Felipe)
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index 9fcfe0d84a..76464c940b 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -777,15 +777,12 @@ PHP_MINIT_FUNCTION(dom)
zend_hash_merge(&dom_documenttype_prop_handlers, &dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0);
zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_documenttype_prop_handlers, sizeof(dom_documenttype_prop_handlers), NULL);
- REGISTER_DOM_CLASS(ce, "DOMNotation", NULL, php_dom_notation_class_functions, dom_notation_class_entry);
+ REGISTER_DOM_CLASS(ce, "DOMNotation", dom_node_class_entry, php_dom_notation_class_functions, dom_notation_class_entry);
zend_hash_init(&dom_notation_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(&dom_notation_prop_handlers, "publicId", dom_notation_public_id_read, NULL TSRMLS_CC);
dom_register_prop_handler(&dom_notation_prop_handlers, "systemId", dom_notation_system_id_read, NULL TSRMLS_CC);
- /* Notation nodes are special */
- dom_register_prop_handler(&dom_notation_prop_handlers, "nodeName", dom_node_node_name_read, NULL TSRMLS_CC);
- dom_register_prop_handler(&dom_notation_prop_handlers, "nodeValue", dom_node_node_value_read, dom_node_node_value_write TSRMLS_CC);
- dom_register_prop_handler(&dom_notation_prop_handlers, "attributes", dom_node_attributes_read, NULL TSRMLS_CC);
+ zend_hash_merge(&dom_notation_prop_handlers, &dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0);
zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_notation_prop_handlers, sizeof(dom_notation_prop_handlers), NULL);
REGISTER_DOM_CLASS(ce, "DOMEntity", dom_node_class_entry, php_dom_entity_class_functions, dom_entity_class_entry);