Skip to content
Browse files

Merge branch 'hotfix/2398'

Close #2398
  • Loading branch information...
2 parents 37a50d3 + cda2127 commit bccfeeb05f68ac0e8f74e782175b0053dcc9875b @weierophinney weierophinney committed
Showing with 7 additions and 1 deletion.
  1. +1 −1 library/Zend/Mvc/Router/Http/Segment.php
  2. +6 −0 tests/ZendTest/Mvc/Router/Http/SegmentTest.php
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',

0 comments on commit bccfeeb

Please sign in to comment.
Something went wrong with that request. Please try again.