Skip to content

Commit

Permalink
Merge pull request #1747 from joaoinacio/ezp26149_emptyviewparameter
Browse files Browse the repository at this point in the history
Fix EZP-26149: PHP notice when using empty view parameter name
  • Loading branch information
João Inácio committed Sep 2, 2016
2 parents 413239f + 88a3a3f commit c4abe5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private function generateViewParametersArray($vpString)

$vpSegments = explode('/', $vpString);
for ($i = 0, $iMax = count($vpSegments); $i < $iMax; ++$i) {
if (!isset($vpSegments[$i])) {
if (empty($vpSegments[$i])) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function siteAccessMatchProvider()
array('/foo/bar/(some)/thing', '/foo/bar', '/(some)/thing', array('some' => 'thing')),
array('/foo/bar/(some)/thing/(other)', '/foo/bar', '/(some)/thing/(other)', array('some' => 'thing', 'other' => '')),
array('/foo/bar/(some)/thing/orphan', '/foo/bar', '/(some)/thing/orphan', array('some' => 'thing/orphan')),
array('/foo/bar/(some)/thing//orphan', '/foo/bar', '/(some)/thing//orphan', array('some' => 'thing/orphan')),
array('/foo/bar/(some)/thing/orphan/(something)/else', '/foo/bar', '/(some)/thing/orphan/(something)/else', array('some' => 'thing/orphan', 'something' => 'else')),
array('/foo/bar/(some)/thing/orphan/(something)/else/(other)', '/foo/bar', '/(some)/thing/orphan/(something)/else/(other)', array('some' => 'thing/orphan', 'something' => 'else', 'other' => '')),
array('/foo/bar/(some)/thing/orphan/(other)', '/foo/bar', '/(some)/thing/orphan/(other)', array('some' => 'thing/orphan', 'other' => '')),
Expand Down

0 comments on commit c4abe5c

Please sign in to comment.