Router#resolveString should return null instead of empty string when $value is null

Closes #4823
This commit is contained in:
Tim Nagel 2012-07-10 14:22:39 +10:00
parent a1d1a02b47
commit c061c30a9e
1 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,10 @@ class Router extends BaseRouter implements WarmableInterface
{
$container = $this->container;
if (null === $value) {
return null;
}
$escapedValue = preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($container, $value) {
// skip %%
if (!isset($match[1])) {