php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch simplexml_countable.patch for SimpleXML related Bug #65215Patch version 2013-07-07 05:20 UTC Return to Bug #65215 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: ww.galen@gmail.comdiff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index e7c2f29..1238ad0 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -35,6 +35,9 @@ #include "zend_exceptions.h" #include "zend_interfaces.h" #include "sxe.h" +#if defined(HAVE_SPL) +# include "ext/spl/spl_iterators.h" +#endif #define SXE_ELEMENT_BY_NAME 0 @@ -2622,6 +2625,9 @@ PHP_MINIT_FUNCTION(simplexml) sxe_class_entry->get_iterator = php_sxe_get_iterator; sxe_class_entry->iterator_funcs.funcs = &php_sxe_iterator_funcs; zend_class_implements(sxe_class_entry TSRMLS_CC, 1, zend_ce_traversable); +#if defined(HAVE_SPL) + zend_class_implements(sxe_class_entry TSRMLS_CC, 1, spl_ce_Countable); +#endif sxe_object_handlers.get_method = zend_get_std_object_handlers()->get_method; sxe_object_handlers.get_constructor = zend_get_std_object_handlers()->get_constructor; sxe_object_handlers.get_class_entry = zend_get_std_object_handlers()->get_class_entry; |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Fri Dec 06 18:01:28 2024 UTC |