Zend\Mvc\Router\Http\Litteral route crashes with empty string as route #2511

Closed
zfbot opened this Issue Sep 28, 2012 · 1 comment

Projects

None yet

3 participants

@zfbot
zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-436
Issue Type:Bug
Reporter:rixo
Created:07/31/12
Assignee:DASPRiD
Components:Zend\Mvc\Router

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.

@zfbot
zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-436

Known GitHub users mentioned in the original message or comment:
@rixo, @DASPRiD

@DASPRiD DASPRiD was assigned Sep 28, 2012
@weierophinney weierophinney added a commit that closed this issue Jan 7, 2013
@weierophinney weierophinney Merge branch 'hotfix/3355'
Close #3355
Fixes #2511
683765e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment