Skip to content

Commit a1532a9

Browse files
authored
Merge pull request #200 from maff/php7.2-count-routers
PHP 7.2 compatibility: check if sortedRouters is null before trying to count it
2 parents d4fa611 + 27192b1 commit a1532a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ChainRouter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface
4747
/**
4848
* @var RouterInterface[] Array of routers, sorted by priority
4949
*/
50-
private $sortedRouters;
50+
private $sortedRouters = [];
5151

5252
/**
5353
* @var RouteCollection

0 commit comments

Comments
 (0)