Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'hotfix/2398'

Close #2398
  • Loading branch information...
commit b24353e4fa63f2199ce8d088161106c7b0301c0a 2 parents 284985f + 616c099
@weierophinney weierophinney authored
View
2  library/Zend/Mvc/Router/Http/Segment.php
@@ -273,7 +273,7 @@ protected function buildPath(array $parts, array $mergedParams, $isOptional, $ha
$skippable = true;
$optionalPart = $this->buildPath($part[1], $mergedParams, true, $hasChild);
- if ($optionalPart !== null) {
+ if ($optionalPart !== '') {
$path .= $optionalPart;
$skip = false;
}
View
6 tests/ZendTest/Mvc/Router/Http/SegmentTest.php
@@ -111,6 +111,12 @@ public static function routeProvider()
null,
array('foo' => 'bar', 'bar' => 'baz')
),
+ 'optional-group-within-optional-group-is-ignored' => array(
+ new Segment('/:foo[/:bar[/:baz]]', array(), array('bar' => 'baz', 'baz' => 'bat')),
+ '/bar',
+ null,
+ array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'bat')
+ ),
'non-standard-delimiter-before-parameter' => array(
new Segment('/foo-:bar'),
'/foo-baz',
Please sign in to comment.
Something went wrong with that request. Please try again.