diff options
| author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-03 17:04:06 +0100 |
|---|---|---|
| committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-03 17:04:06 +0100 |
| commit | 7b4a4d2ace0015e6e7cc34f309edda91a8097d71 (patch) | |
| tree | f4543ce9ab9d6dfd37c68453de5831796af70b9f /ext/intl | |
| parent | 1658b5babc34c46b3b78b852e7a5f134845ace7c (diff) | |
| download | php-git-7b4a4d2ace0015e6e7cc34f309edda91a8097d71.tar.gz | |
Use RETURN_THROWS() after try_convert_to_string()
Diffstat (limited to 'ext/intl')
| -rw-r--r-- | ext/intl/dateformat/dateformat_format_object.cpp | 2 | ||||
| -rw-r--r-- | ext/intl/timezone/timezone_methods.cpp | 2 | ||||
| -rw-r--r-- | ext/intl/transliterator/transliterator_methods.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp index 3d784a997c..9723006b15 100644 --- a/ext/intl/dateformat/dateformat_format_object.cpp +++ b/ext/intl/dateformat/dateformat_format_object.cpp @@ -141,7 +141,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object) dateStyle = timeStyle = (DateFormat::EStyle)Z_LVAL_P(format); } else { if (!try_convert_to_string(format)) { - return; + RETURN_THROWS(); } if (Z_STRLEN_P(format) == 0) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index d7f426dcb1..d11d8433c6 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -164,7 +164,7 @@ double_offset: zend_long lval; double dval; if (!try_convert_to_string(arg)) { - return; + RETURN_THROWS(); } switch (is_numeric_string(Z_STRVAL_P(arg), Z_STRLEN_P(arg), &lval, &dval, 0)) { case IS_DOUBLE: diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c index db3634f075..fcf788d7da 100644 --- a/ext/intl/transliterator/transliterator_methods.c +++ b/ext/intl/transliterator/transliterator_methods.c @@ -316,7 +316,7 @@ PHP_FUNCTION( transliterator_transliterate ) { /* not a transliterator object as first argument */ int res; if( !try_convert_to_string( arg1 ) ) { - return; + RETURN_THROWS(); } object = &tmp_object; res = create_transliterator( Z_STRVAL_P( arg1 ), Z_STRLEN_P( arg1 ), |
