Skip to content

Commit

Permalink
Merge pull request #25 from giggsey/hhvm
Browse files Browse the repository at this point in the history
Add support for HHVM
  • Loading branch information
giggsey committed May 7, 2014
2 parents 081d411 + 2006811 commit bd6bd81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ language: php
matrix:
allow_failures:
- 5.6
- hhvm

php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm

before_script:
- wget http://getcomposer.org/composer.phar
Expand Down
2 changes: 1 addition & 1 deletion src/libphonenumber/PhoneNumberUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ public function maybeStripInternationalPrefixAndNormalize(&$number, $possibleIdd
// Check to see if the number begins with one or more plus signs.
$match = preg_match('/^' . self::$PLUS_CHARS_PATTERN . '/' . self::REGEX_FLAGS, $number, $matches, PREG_OFFSET_CAPTURE);
if ($match > 0) {
$number = substr($number, $matches[0][1] + mb_strlen($matches[0][0]));
$number = mb_substr($number, $matches[0][1] + mb_strlen($matches[0][0]));
// Can now normalize the rest of the number since we've consumed the "+" sign at the start.
$number = $this->normalize($number);
return CountryCodeSource::FROM_NUMBER_WITH_PLUS_SIGN;
Expand Down

0 comments on commit bd6bd81

Please sign in to comment.