diff --git a/.travis.yml b/.travis.yml index c30efee..3ddd7c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,16 +12,24 @@ matrix: - php: nightly fast_finish: true -before_script: - - composer self-update - - composer install +env: + - DEPS=lowest + - DEPS=highest + +install: + - if [ "$DEPS" = "lowest" ]; then + composer update -n --prefer-source --prefer-lowest; + else + composer update -n --prefer-source; + fi; + - composer show script: - phpdbg -qrr vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml - php vendor/bin/php-cs-fixer --diff --dry-run -v fix after_script: - - composer require satooshi/php-coveralls:dev-master + - composer require satooshi/php-coveralls dev-master - php vendor/bin/coveralls -v cache: diff --git a/lib/DefaultResolver.php b/lib/DefaultResolver.php index b723480..a5c85e9 100644 --- a/lib/DefaultResolver.php +++ b/lib/DefaultResolver.php @@ -440,9 +440,9 @@ class DefaultResolver implements Resolver { if (\strpos($uri, "://") !== false) { return $uri; } - if (($colonPos = \strrpos(":", $uri)) !== false) { + if (($colonPos = \strrpos($uri, ":")) !== false) { $addr = \substr($uri, 0, $colonPos); - $port = \substr($uri, $colonPos); + $port = \substr($uri, $colonPos + 1); } else { $addr = $uri; $port = 53;