. Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks
pattern). (Gustavo)
. Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo)
+ . Fixed bug #55610 (ResourceBundle should implement Traversable). (stealth35)
- XML Writer:
. Fixed bug #62064 (memory leak in the XML Writer module).
ResourceBundle_object_handlers.clone_obj = NULL; /* ICU ResourceBundle has no clone implementation */
ResourceBundle_object_handlers.read_dimension = resourcebundle_array_get;
ResourceBundle_object_handlers.count_elements = resourcebundle_array_count;
+
+ zend_class_implements(ResourceBundle_ce_ptr TSRMLS_CC, 1, zend_ce_traversable);
}
/* }}} */
--- /dev/null
+--TEST--
+Bug #55610: ResourceBundle does not implement Traversable
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+ include "resourcebundle.inc";
+
+ $r = new ResourceBundle( 'es', BUNDLE );
+
+ var_dump($r instanceof Traversable);
+ var_dump(iterator_to_array($r->get('testarray')));
+?>
+--EXPECTF--
+bool(true)
+array(3) {
+ [0]=>
+ string(8) "cadena 1"
+ [1]=>
+ string(8) "cadena 2"
+ [2]=>
+ string(8) "cadena 3"
+}