1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00

Merge branch 'PHP-5.5'

This commit is contained in:
Xinchen Hui
2013-06-09 22:26:18 +08:00
+13 -6
View File
@@ -1013,12 +1013,12 @@ static void spl_recursive_tree_iterator_get_entry(spl_recursive_it_object * obje
zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, &error_handling TSRMLS_CC);
if (data && *data) {
RETVAL_ZVAL(*data, 1, 0);
}
if (Z_TYPE_P(return_value) == IS_ARRAY) {
zval_dtor(return_value);
ZVAL_STRINGL(return_value, "Array", sizeof("Array")-1, 1);
} else {
convert_to_string(return_value);
if (Z_TYPE_P(return_value) == IS_ARRAY) {
zval_dtor(return_value);
ZVAL_STRINGL(return_value, "Array", sizeof("Array")-1, 1);
} else {
convert_to_string(return_value);
}
}
zend_restore_error_handling(&error_handling TSRMLS_CC);
}
@@ -1119,8 +1119,15 @@ SPL_METHOD(RecursiveTreeIterator, current)
}
}
INIT_ZVAL(prefix);
INIT_ZVAL(entry);
spl_recursive_tree_iterator_get_prefix(object, &prefix TSRMLS_CC);
spl_recursive_tree_iterator_get_entry(object, &entry TSRMLS_CC);
if (Z_TYPE(entry) != IS_STRING) {
zval_dtor(&prefix);
zval_dtor(&entry);
RETURN_NULL();
}
spl_recursive_tree_iterator_get_postfix(object, &postfix TSRMLS_CC);
str_len = Z_STRLEN(prefix) + Z_STRLEN(entry) + Z_STRLEN(postfix);