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

Bug #4068 errant "return true;" in Validate_US::phoneNumber
Submitted: 2005-04-05 15:48 UTC Modified: 2006-12-27 00:14 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  


 [2005-04-05 15: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 03: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.