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  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2006-12-27 05:14 UTC
Package:
Bug Type:
Summary:
From: mcraig at leadehealth dot com
New email:
PHP Version: Package Version: OS:

 

 [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.