Browse Source

- fix tests to comply with upgraded string.c

- use add_next_index_zval() when listing handlers
migration/RELEASE_1_0_0
Michael Wallner 20 years ago
parent
commit
0ff7bc29d9
  1. 7
      main/output.c
  2. 2
      tests/output/ob_014.phpt
  3. 2
      tests/output/ob_015.phpt

7
main/output.c

@ -1131,11 +1131,8 @@ static int php_output_stack_apply_list(void *h, void *z)
php_output_handler *handler = *(php_output_handler **) h;
zval *array = (zval *) z;
if (Z_TYPE_P(handler->name) == IS_UNICODE) {
add_next_index_unicodel(array, Z_USTRVAL_P(handler->name), Z_USTRLEN_P(handler->name), 1);
} else {
add_next_index_stringl(array, Z_STRVAL_P(handler->name), Z_STRLEN_P(handler->name), 1);
}
ZVAL_ADDREF(handler->name);
add_next_index_zval(array, handler->name);
return 0;
}
/* }}} */

2
tests/output/ob_014.phpt

@ -11,4 +11,4 @@ echo "foo\n";
--EXPECTF--
foo
Warning: Wrong parameter count for (null)() in %s on line %d
Warning: (null)() expects exactly 1 parameter, 2 given in %s on line %d

2
tests/output/ob_015.phpt

@ -8,4 +8,4 @@ echo "foo\n";
--EXPECTF--
foo
Warning: Wrong parameter count for str_rot13() in %s on line %d
Warning: str_rot13() expects exactly 1 parameter, 2 given in %s on line %d
Loading…
Cancel
Save