|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71350 Possible bugs and change requests about idna functions
Submitted: 2016-01-12 11:38 UTC Modified: -
From: nospampls at example dot org Assigned:
Status: Open Package: intl (PECL)
PHP Version: 7.0.2 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
5 + 47 = ?
Subscribe to this entry?

 [2016-01-12 11:38 UTC] nospampls at example dot org
Firstly, not really important,
should be merged into a single constant if possible.
The reason ICU have both is that IDNA configuration is shared for both encoding and decoding. PHP has two separate functions, one constant would be enough.

The constant DOMAIN_NAME_TOO_LONG doesn't look to be actually used ever. Since the functions just return false (without populating $info, when intl.exceptions is off) or throw a generic exception. I would suggest to always populate $info and include this error when intl.exceptions is off.

Same goes with idna_to_*("" /* empty string */, ..., ..., $info), rather than just returning false (and throw an exception if they are enabled), i would expect it to populate $info with the IDNA_ERROR_EMPTY_LABEL set (as happens with raw ICU).


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 22:03:34 2021 UTC