[-] FO : FixBug when route id is empty

This commit is contained in:
Jerome Nadaud
2013-08-27 12:01:40 +02:00
parent 99b162d16b
commit 6aad506c80

View File

@@ -601,7 +601,7 @@ class DispatcherCore
{
$query = http_build_query($params, '', '&');
$index_link = $this->use_routes ? '' : 'index.php';
return ($route_id == 'index') ? $index_link.(($query) ? '?'.$query : '') : 'index.php?controller='.$route_id.(($query) ? '&'.$query : '').$anchor;
return ($route_id == 'index') ? $index_link.(($query) ? '?'.$query : '') : ((trim($route_id) == '') ? '' : 'index.php?controller='.$route_id).(($query) ? '&'.$query : '').$anchor;
}
$route = $this->routes[$id_shop][$id_lang][$route_id];
// Check required fields