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

Bug #14931 Warning: max(): Array must contain atleast one element
Submitted: 2008-10-31 13:13 UTC Modified: 2008-12-06 09:43 UTC
From: doconnor Assigned: doconnor
Status: Closed Package: Validate (version CVS)
PHP Version: 5.2.4 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-10-31 13:13 UTC] doconnor (Daniel O'Connor)
Description: ------------ Unit tests are failing - rfc822nok.phpt Produces: Warning: max(): Array must contain atleast one element in /home/clockwerx/pear/Validate/Validate.php on line 530 Test script: --------------- pear run-tests Actual result: -------------- 145) /home/clockwerx/pear/Validate/tests/rfc822nok.phpt --- Expected +++ Actual @@ -0,0 +1,3 @@ +Abigail <abigail(fo(o)@example.com> failed + +Warning: max(): Array must contain atleast one element in /home/clockwerx/pear/Validate/Validate.php on line 530 \ No newline at end of file

Comments

 [2008-10-31 13:21 UTC] doconnor (Daniel O'Connor)
Need to check if $chars is empty() Such as: $chars = count_chars($domain, 1); if (!empty($chars) && max(array_keys($chars)) > 127) { include_once 'Net/IDNA.php'; $idna =& Net_IDNA::singleton(); $domain = $idna->encode($domain); } $email = "$name@$domain"; I would do a patch but my local working copy is a bit upset.
 [2008-12-06 09:43 UTC] doconnor (Daniel O'Connor)
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. Fixed after no response from maintainer (nov 5th)