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

Bug #11712 checkMOD23 buggy. IE6572557W is a valid vat number.
Submitted: 2007-07-30 23:41 UTC
From: kguest Assigned: kguest
Status: Closed Package: Validate_IE (version CVS)
PHP Version: 5.1.6 OS: n/a
Roadmaps: 0.3.0    

 [2007-07-30 23:41 UTC] kguest (Ken Guest)
Description: ------------ IE6572557W is a valid vat number according to and the fact that it is a real-world vat number; found courtesy of google. there is a bug in the checkMOD23 function that calculates the checksum letter should be '@' rather than W. Test script: --------------- <?php include("Validate/IE.php"); $noYes = array('NO', 'YES'); echo $noYes[Validate_IE::vatNumber("IE6572557W")."\n"; ?> Expected result: ---------------- test should pass - display Yes. Actual result: -------------- displays no.


 [2007-07-30 23:51 UTC] kguest (Ken Guest)
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. if the modulus 23 of the calculated total was 0 (ie the total is a multiple of 23) then the checksum was determined to be ascii character 64 - the '@' symbol when it should have been character 64+23 - 'W'.