diff options
author | Daniel Persson <daniel.persson@textalk.se> | 2015-09-07 22:15:52 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-04-08 12:31:19 +0200 |
commit | 0030fa322fd987da3a0b210837fd5d41e7559368 (patch) | |
tree | 70d87d24c495e9bd2aec8b50814c4246cbc131b1 | |
parent | e3b160bf864fa3b6b2bf938e62f18768032980ab (diff) | |
download | php-git-0030fa322fd987da3a0b210837fd5d41e7559368.tar.gz |
Changed to check for error with the new function that returns null if error is set
-rw-r--r-- | ext/intl/uchar/uchar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index 755a6c9acb..266c62821b 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -241,7 +241,7 @@ IC_METHOD(charName) { if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &nameChoice) == FAILURE) || (convert_cp(&cp, zcp) == FAILURE)) { - return; + RETURN_NULL(); } buffer_len = u_charName(cp, (UCharNameChoice)nameChoice, NULL, 0, &error); @@ -250,7 +250,7 @@ IC_METHOD(charName) { buffer_len = u_charName(cp, (UCharNameChoice)nameChoice, ZSTR_VAL(buffer), ZSTR_LEN(buffer) + 1, &error); if (U_FAILURE(error)) { zend_string_free(buffer); - INTL_CHECK_STATUS(error, "Failure getting character name"); + INTL_CHECK_STATUS_OR_NULL(error, "Failure getting character name"); } RETURN_NEW_STR(buffer); } @@ -269,11 +269,11 @@ IC_METHOD(charFromName) { UErrorCode error = U_ZERO_ERROR; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &name, &name_len, &nameChoice) == FAILURE) { - return; + RETURN_NULL(); } ret = u_charFromName((UCharNameChoice)nameChoice, name, &error); - INTL_CHECK_STATUS(error, NULL); + INTL_CHECK_STATUS_OR_NULL(error, NULL); RETURN_LONG(ret); } /* }}} */ |