remove() should not use deprecated getParent() so it does not trigger deprecation internally

This commit is contained in:
Tobias Schultze 2013-03-05 12:20:45 +01:00
parent 708c0d3ff9
commit c0687cd5fa
1 changed files with 4 additions and 1 deletions

View File

@ -163,7 +163,10 @@ class RouteCollection implements \IteratorAggregate, \Countable
public function remove($name)
{
// just for BC
$root = $this->getRoot();
$root = $this;
while ($root->parent) {
$root = $root->parent;
}
foreach ((array) $name as $n) {
unset($root->routes[$n]);