From: Daniel Persson Date: Mon, 7 Sep 2015 20:15:52 +0000 (+0200) Subject: Changed to check for error with the new function that returns null if error is set X-Git-Tag: php-7.0.6RC1~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0030fa322fd987da3a0b210837fd5d41e7559368;p=php Changed to check for error with the new function that returns null if error is set --- 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); } /* }}} */