Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Bug #14865 Unit test failure: email.phpt (Net_IDNA?)
Submitted: 2008-10-25 07:52 UTC
From: doconnor Assigned: amir
Status: Closed Package: Validate (version CVS)
PHP Version: 5.2.4 OS:
Roadmaps: (Not assigned)    

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 !
Your email address:
Solve the problem : 39 - 20 = ?

 [2008-10-25 07:52 UTC] doconnor (Daniel O'Connor)
Description: ------------ Fatal error: Uncaught exception 'Exception' with message 'Conversion from UTF-8 to UCS-4 failed: malformed input at byte 2' in /usr/share/php/Net/IDNA/php5.php:3023 Test script: --------------- pear run-tests Expected result: ---------------- Test passes Actual result: -------------- Test Validate_Email with domain check : YES without domain check : YES YES Notice: Undefined index: VALIDATE_ITLD_EMAILS in /home/clockwerx/pear/Validate/Validate.php on line 414 Notice: Undefined index: VALIDATE_GTLD_EMAILS in /home/clockwerx/pear/Validate/Validate.php on line 418 Notice: Undefined index: VALIDATE_CCTLD_EMAILS in /home/clockwerx/pear/Validate/Validate.php on line 422 NO example (though bad) YES bugme@not./com: YES hæjjæ NO þæöð NO Fatal error: Uncaught exception 'Exception' with message 'Conversion from UTF-8 to UCS-4 failed: malformed input at byte 2' in /usr/share/php/Net/IDNA/php5.php:3023 Stack trace: #0 /usr/share/php/Net/IDNA/php5.php(2288): Net_IDNA_php5->_utf8_to_ucs4('t?') #1 /home/clockwerx/pear/Validate/Validate.php(511): Net_IDNA_php5->encode('t?') #2 /home/clockwerx/pear/Validate/tests/email.php(101): Validate::email('postmaster@t?v....') #3 {main} thrown in /usr/share/php/Net/IDNA/php5.php on line 3023


 [2008-10-25 08:07 UTC] doconnor (Daniel O'Connor)
After looking into this more closely, I don't think it is possible to fix this problem without breaking PHP4. Probably better to alter the tests to try {} catch, and document that validate::email() can raise exceptions from Net_IDNA::encode.
 [2008-10-25 08:18 UTC] doconnor (Daniel O'Connor)
Attached patch lets the test fail more gracefully.
 [2009-02-26 14:33 UTC] amir (Amir Mohammad Saied)
-Status: Open +Status: Closed -Assigned To: +Assigned To: amir
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.