Home » Validate » Validate » Bug #4068
errant "return true;" in Validate_US::phoneNumber
Details
| 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 |
Comments
[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