svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/php_dom.c trunk/ext/dom/php_dom.c
| From: | Rob Richards | Date: | Fri, 09 Apr 2010 11:34:34 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/php_dom.c trunk/ext/dom/php_dom.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62230@lists.php.net to get a copy of this message | ||
rrichards Fri, 09 Apr 2010 11:34:34 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=297744
Log:
fix bug #50828 (DOMNotation is not subclass of DOMNode)
Bug: http://bugs.php.net/50828 (Open) DOMNotation is not
subclass of DOMNode
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
U php/php-src/trunk/ext/dom/php_dom.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-04-09 10:57:47 UTC (rev 297743)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-04-09 11:34:34 UTC (rev 297744)
@@ -44,6 +44,7 @@
- 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)
Modified: php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/dom/php_dom.c 2010-04-09 10:57:47 UTC (rev 297743)
+++ php/php-src/branches/PHP_5_3/ext/dom/php_dom.c 2010-04-09 11:34:34 UTC (rev 297744)
@@ -777,15 +777,12 @@
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);
Modified: php/php-src/trunk/ext/dom/php_dom.c
===================================================================
--- php/php-src/trunk/ext/dom/php_dom.c 2010-04-09 10:57:47 UTC (rev 297743)
+++ php/php-src/trunk/ext/dom/php_dom.c 2010-04-09 11:34:34 UTC (rev 297744)
@@ -777,15 +777,12 @@
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);