Permalink
Browse files

Love Davide ;)

  • Loading branch information...
1 parent 33ff3ca commit 9f3df01e63ad73aa92c2cb3ea6de3c679bac362a eduardo committed Sep 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 PhoneNumberUtil.php
View
@@ -2273,8 +2273,8 @@ private function getNumberTypeHelper($nationalNumber, PhoneMetadata $metadata) {
}
private function isNumberMatchingDesc($nationalNumber, PhoneNumberDesc $numberDesc) {
- $possibleNumberPatternMatcher = preg_match('/^' . str_replace(array(PHP_EOL, ' '), '', $numberDesc->getPossibleNumberPattern()) . '$/', $nationalNumber);
- $nationalNumberPatternMatcher = preg_match('/^' . str_replace(array(PHP_EOL, ' '), '', $numberDesc->getNationalNumberPattern()) . '$/', $nationalNumber);
+ $possibleNumberPatternMatcher = preg_match('/^(' . str_replace(array(PHP_EOL, ' '), '', $numberDesc->getPossibleNumberPattern()) . ')$/', $nationalNumber);
+ $nationalNumberPatternMatcher = preg_match('/^(' . str_replace(array(PHP_EOL, ' '), '', $numberDesc->getNationalNumberPattern()) . ')$/', $nationalNumber);
return $possibleNumberPatternMatcher && $nationalNumberPatternMatcher;
}
@@ -2391,4 +2391,4 @@ public function reset($input = "") {
$this->subject = $input;
return $this;
}
-}
+}

0 comments on commit 9f3df01

Please sign in to comment.