|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-05-12 18:36 UTC] cmbecker69 at gmx dot de
[2014-07-07 05:40 UTC] stas@php.net
-Status: Open
+Status: Not a bug
[2014-07-07 05:40 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 05:00:01 2025 UTC |
Description: ------------ In case the $domain argument has a value of 68+ characters long the function silently returns (bool) false and doesn't indicate an exceptional case. Test script: --------------- error_reporting(E_ALL); ini_set('display_errors', 'on'); foreach ([67, 68] as $i) { $err = 0; $domain = str_pad('.com', $i, 'a', STR_PAD_LEFT); $asciiDomain = idn_to_ascii($domain, $err); if (false === $asciiDomain) { echo "Length limit is $i. Error '$err'. Stop.\n"; var_dump($err); } else { echo "Length $i. asciiDomain is '$asciiDomain'. OK\n"; } } Expected result: ---------------- PHP should at least report a warning about wrong input. Actual result: -------------- The function just returns (bool) false without any error indication.