Skip to content

Commit

Permalink
make sure substr picks the correct length
Browse files Browse the repository at this point in the history
  • Loading branch information
mbed67 authored and jaapio committed Jun 23, 2017
1 parent 6705115 commit 04dbcf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/phpDocumentor/Transformer/Router/StandardRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function configure()
// if this is a link to an external page; return that URL
$this[] = new Rule(
function ($node) {
return is_string($node) && (substr($node, 0, 7) == 'http://' || substr($node, 0, 7) == 'https://');
return is_string($node) && (substr($node, 0, 7) == 'http://' || substr($node, 0, 8) == 'https://');
},
function ($node) { return $node; }
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function testIfARouteForAFileCanBeGenerated($descriptorName, $generatorNa

/**
* @covers phpDocumentor\Transformer\Router\StandardRouter::configure
* @covers phpDocumentor\Transformer\Router\StandardRouter::__construct
* @covers phpDocumentor\Transformer\Router\RouterAbstract::__construct
* @covers phpDocumentor\Transformer\Router\RouterAbstract::configure
* @covers phpDocumentor\Transformer\Router\RouterAbstract::match
Expand Down

0 comments on commit 04dbcf4

Please sign in to comment.