No prefix is required to override imported RouteCollections

This commit is contained in:
Eric Clemmons 2012-02-01 20:54:56 -08:00
parent c373d5b656
commit 3c28ab7abd

View File

@ -209,12 +209,8 @@ class RouteCollection implements \IteratorAggregate
// a prefix must not end with a slash
$prefix = rtrim($prefix, '/');
if (!$prefix) {
return;
}
// a prefix must start with a slash
if ('/' !== $prefix[0]) {
if ($prefix && '/' !== $prefix[0]) {
$prefix = '/'.$prefix;
}