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

Bug #4068 errant "return true;" in Validate_US::phoneNumber
Submitted: 2005-04-05 20:48 UTC
From: mcraig at leadehealth dot com Assigned: dufuz
Status: Closed Package: Validate
PHP Version: 4.3.9 OS: Linux
Roadmaps: 0.8.0    
Subscription  
Comments Add Comment Add patch


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:
MUST BE VALID
Solve the problem : 20 - 9 = ?

 
 [2005-04-05 20:48 UTC] mcraig at leadehealth dot com
Description: ------------ Line 285 looks like a misplaced return statement. If the area code is ever required it will always return true even when it should not. CVS version: Revision 1.20, Tue Jan 11 09:58:54 2005 (2 months, 3 weeks ago) by dufuz Reproduce code: --------------- <?php require_once('Validate/US.php'); Validate_US::phoneNumber((123) 456-78); Validate_US::phoneNumber((313) 535-8553); Validate_US::phoneNumber((517) 474-); ?> Expected result: ---------------- false true false Actual result: -------------- true true true

Comments

 [2005-04-06 08:30 UTC] dufuz
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.