$e->getRouteMatch() returns an object, we need a string.

$e->getRouteMatch() returns an object, we need a string.