php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73577 idn_to_ascii/utf8 does not populate the $idna_info array
Submitted: 2016-11-22 01:06 UTC Modified: 2016-11-22 13:02 UTC
From: smokey101stair at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: intl (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: smokey101stair at gmail dot com
New email:
PHP Version: OS:

 

 [2016-11-22 01:06 UTC] smokey101stair at gmail dot com
Description:
------------
The idn_to_ascii and idn_to_utf8 functions, when used with the variant INTL_IDNA_VARIANT_UTS46, do not populate their 4th argument ($idna_info) when the given domain name is longer than 254 characters. The length of the domain name in the test script is 264 characters.

Test script:
---------------
https://3v4l.org/5nYOF

Expected result:
----------------
I expect that the $idna_info would be an array populated with the "result", "isTransitionalDifferent", and "errors" keys.  The "errors" key in the test case should have a value matching the value of the IDNA_ERROR_DOMAIN_NAME_TOO_LONG constant.

array(3) {
    "result" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd.google-analytics.com",
    "isTransitionalDifferent" => false,
    "errors" => 4
}

Actual result:
--------------
$idna_info is an empty array, providing no feedback on why the process failed.

array(0) {
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-22 13:02 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2016-11-22 13:02 UTC] cmb@php.net
This is basically a duplicate of bug #72506, which had
inadvertantly been closed, but I've re-opened the ticket now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 08:01:29 2024 UTC