Skip to content

Commit 4d3be2a

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Revert "Move to non deprecated API on suitable ICU versions"
2 parents 0b6d869 + 9b9814f commit 4d3be2a

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

ext/intl/idn/idn.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,34 +198,16 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
198198
}
199199
RETURN_FALSE;
200200
} else {
201+
UParseError parse_error;
201202
UChar converted[MAXPATHLEN];
202203
int32_t converted_ret_len;
203204

204205
status = U_ZERO_ERROR;
205-
206-
#if U_ICU_VERSION_MAJOR_NUM >= 55
207-
UIDNAInfo info = UIDNA_INFO_INITIALIZER;
208-
UIDNA *idna = uidna_openUTS46((int32_t)option, &status);
209-
210-
if (U_FAILURE(status)) {
211-
intl_error_set( NULL, status, "idn_to_ascii: failed to create an UIDNA instance", 0 );
212-
RETURN_FALSE;
213-
}
214-
215-
if (mode == INTL_IDN_TO_ASCII) {
216-
converted_ret_len = uidna_nameToASCII(idna, ustring, ustring_len, converted, MAXPATHLEN, &info, &status);
217-
} else {
218-
converted_ret_len = uidna_nameToUnicode(idna, ustring, ustring_len, converted, MAXPATHLEN, &info, &status);
219-
}
220-
uidna_close(idna);
221-
#else
222-
UParseError parse_error;
223206
if (mode == INTL_IDN_TO_ASCII) {
224207
converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
225208
} else {
226209
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
227210
}
228-
#endif
229211
efree(ustring);
230212

231213
if (U_FAILURE(status)) {

0 commit comments

Comments
 (0)