diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php index 5695617..13fc0eb 100644 --- a/core/lib/Drupal/Core/Routing/RouteProvider.php +++ b/core/lib/Drupal/Core/Routing/RouteProvider.php @@ -343,14 +343,14 @@ protected function getRoutesByPath($path) { ->fetchAll(\PDO::FETCH_ASSOC); // We sort by fit and name in PHP to avoid a SQL filesort. - usort($routes, array($this, function(array $a, array $b) { + usort($routes, function(array $a, array $b) { if ($a['fit'] == $b['fit']) { return strcmp($a['name'], $b['name']); } // Reverse sort from highest to lowest fit. PHP should cast to int, but // the explicit cast makes this sort more robust against unexpected input. return (int) $a['fit'] < (int) $b['fit'] ? 1 : -1; - })); + }); foreach ($routes as $row) { $collection->add($row['name'], unserialize($row['route']));