Skip to content

Commit

Permalink
view->url(): Clone $path if it's already of type Icinga\Web\Url
Browse files Browse the repository at this point in the history
Avoids side effects in case of url params adjustments.

fixes #9351
  • Loading branch information
Johannes Meyer committed Jun 9, 2015
1 parent f2c7d56 commit eba862a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/Icinga/Web/View/helpers/url.php
Expand Up @@ -20,7 +20,12 @@
} else {
$url = Url::fromPath($path);
}

if ($params !== null) {
if ($url === $path) {
$url = clone $url;
}

$url->overwriteParams($params);
}

Expand Down

0 comments on commit eba862a

Please sign in to comment.