int spattern_len = 0;
zval* object;
MessageFormatter_object* mfo;
- int zpp_flags = is_constructor ? ZEND_PARSE_PARAMS_THROW : 0;
+ UParseError parse_error;
intl_error_reset( NULL );
object = return_value;
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
return_value = ZEND_THIS;
- if (msgfmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
+ if (msgfmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) {
if (!EG(exception)) {
- zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0);
+ zend_string *err = intl_error_get_message(NULL);
+ zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(err), intl_error_get_code(NULL));
+ zend_string_release_ex(err, 0);
}
}
zend_restore_error_handling(&error_handling);
?>
--EXPECTF--
-ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::__construct() expects exactly 2 arguments, 0 given in %s on line %d
+'U_ZERO_ERROR'
-Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: msgfmt_create() expects exactly 2 arguments, 0 given in %s on line %d
+'U_ZERO_ERROR'
-Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::create() expects exactly 2 arguments, 0 given in %s on line %d
+'U_ZERO_ERROR'
-ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::__construct() expects exactly 2 arguments, 1 given in %s on line %d
+'U_ZERO_ERROR'
-Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: msgfmt_create() expects exactly 2 arguments, 1 given in %s on line %d
+'U_ZERO_ERROR'
-Warning: MessageFormatter::create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::create() expects exactly 2 arguments, 1 given in %s on line %d
+'U_ZERO_ERROR'
- IntlException: Constructor failed in %s on line %d
+ IntlException: msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR in %s on line %d
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: MessageFormatter::__construct(): Argument #1 ($locale) must be of type string, array given in %s on line %d
+'U_ZERO_ERROR'
-Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: MessageFormatter::create(): Argument #1 ($locale) must be of type string, array given in %s on line %d
+'U_ZERO_ERROR'
-Warning: msgfmt_create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: msgfmt_create(): Argument #1 ($locale) must be of type string, array given in %s on line %d
+'U_ZERO_ERROR'
- IntlException: Constructor failed in %s on line %d
- 'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
- 'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
- 'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
+ IntlException: pattern syntax error (parse error at offset 1, after "{", before or at "0,choice}"): U_PATTERN_SYNTAX_ERROR in %s on line %d
+ 'pattern syntax error (parse error at offset 1, after "{", before or at "0,choice}"): U_PATTERN_SYNTAX_ERROR'
+ 'pattern syntax error (parse error at offset 1, after "{", before or at "0,choice}"): U_PATTERN_SYNTAX_ERROR'
+ 'pattern syntax error (parse error at offset 1, after "{", before or at "0,choice}"): U_PATTERN_SYNTAX_ERROR'
- IntlException: Constructor failed in %s on line %d
+ IntlException: msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES in %s on line %d
'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'