Fix Address::parseFTN when matching addresses with 0's, minor cosmetic fixes, test subjects < 72 chars
This commit is contained in:
@@ -130,11 +130,11 @@ class Address extends Model
|
||||
|
||||
// Check our numbers are correct.
|
||||
foreach ([1,2,3] as $i) {
|
||||
if (! $matches[$i] || ($matches[$i] > DomainController::NUMBER_MAX))
|
||||
if ((! is_numeric($matches[$i])) || ($matches[$i] > DomainController::NUMBER_MAX))
|
||||
throw new Exception('Invalid FTN: '.$ftn);
|
||||
}
|
||||
|
||||
if (isset($matches[5]) AND $matches[5] > DomainController::NUMBER_MAX)
|
||||
if (isset($matches[5]) AND ((! is_numeric($matches[$i])) || ($matches[5] > DomainController::NUMBER_MAX)))
|
||||
throw new Exception('Invalid FTN: '.$ftn);
|
||||
|
||||
return [
|
||||
|
Reference in New Issue
Block a user