ZF2-436: Zend\Mvc\Router\Http\Litteral route crashes with empty string as route

Description

For example, the following code:

$request = new \Zend\Http\PhpEnvironment\Request;
$route = new \Zend\Mvc\Router\Http\Literal('');
$route->match($request, strlen($request->getBaseUrl()));

Will raise the following error:

Fatal error: Uncaught PHP error with message: 'strpos(): Empty delimiter' in ... /Zend/Mvc/Router/Http/Literal.php:99

It is possible to workaround this problem with an empty Regex route.

Comments

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2511