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

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)    
Subscription  


 [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 pear-general@lists.php.net: with domain check : YES example@fluffffffrefrffrfrfrfrfrfr.is: without domain check : YES example@fluffffffrefrffrfrfrfrfrfr.is: YES davidc@php.net: 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)@example.com: YES bugme@not./com: YES hæjjæ@homms.com: NO þæöð@example.com: 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?v.de') #1 /home/clockwerx/pear/Validate/Validate.php(511): Net_IDNA_php5->encode('t?v.de') #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

Comments

 [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 pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net 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.