remove() should not use deprecated getParent() so it does not trigger deprecation internally
This commit is contained in:
parent
708c0d3ff9
commit
c0687cd5fa
@ -163,7 +163,10 @@ class RouteCollection implements \IteratorAggregate, \Countable
|
|||||||
public function remove($name)
|
public function remove($name)
|
||||||
{
|
{
|
||||||
// just for BC
|
// just for BC
|
||||||
$root = $this->getRoot();
|
$root = $this;
|
||||||
|
while ($root->parent) {
|
||||||
|
$root = $root->parent;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ((array) $name as $n) {
|
foreach ((array) $name as $n) {
|
||||||
unset($root->routes[$n]);
|
unset($root->routes[$n]);
|
||||||
|
Reference in New Issue
Block a user