summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2010-05-04 12:55:26 +0000
committerRob Richards <rrichards@php.net>2010-05-04 12:55:26 +0000
commit798aca0d834da10f688094d46dfb0909bd786891 (patch)
tree09970083ab983f69a0003a7312c4e5e00e91176d
parent60f62fc563e9bb223b4f2352a40bf46749771a50 (diff)
downloadphp-git-798aca0d834da10f688094d46dfb0909bd786891.tar.gz
fix bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable)
-rw-r--r--ext/dom/php_dom.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index 0ad4aa1e75..eb364a73b2 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -29,6 +29,7 @@
#include "ext/standard/php_rand.h"
#include "php_dom.h"
#include "dom_properties.h"
+#include "zend_interfaces.h"
#include "ext/standard/info.h"
#define PHP_XPATH 1
@@ -680,6 +681,7 @@ PHP_MINIT_FUNCTION(dom)
ce.create_object = dom_nnodemap_objects_new;
dom_nodelist_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
dom_nodelist_class_entry->get_iterator = php_dom_get_iterator;
+ zend_class_implements(dom_nodelist_class_entry TSRMLS_CC, 1, zend_ce_traversable);
zend_hash_init(&dom_nodelist_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(&dom_nodelist_prop_handlers, "length", dom_nodelist_length_read, NULL TSRMLS_CC);
@@ -689,6 +691,7 @@ PHP_MINIT_FUNCTION(dom)
ce.create_object = dom_nnodemap_objects_new;
dom_namednodemap_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
dom_namednodemap_class_entry->get_iterator = php_dom_get_iterator;
+ zend_class_implements(dom_namednodemap_class_entry TSRMLS_CC, 1, zend_ce_traversable);
zend_hash_init(&dom_namednodemap_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(&dom_namednodemap_prop_handlers, "length", dom_namednodemap_length_read, NULL TSRMLS_CC);