PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Validate » Validate » Bug #4068

errant "return true;" in Validate_US::phoneNumber

Details

Submitted2005-04-05 20:48 UTC
Frommcraig at leadehealth dot com
Assigneddufuz
StatusClosed
PackageValidate
PHP Version4.3.9
OSLinux
Roadmaps0.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