diff --git a/core/lib/Drupal/Core/Routing/MatcherDumper.php b/core/lib/Drupal/Core/Routing/MatcherDumper.php index 693c356dec0e958de80b73095eefd434ba6d14b3..48b2d8c1d16ba57fd0fe60d7c87b164fca8aa0b3 100644 --- a/core/lib/Drupal/Core/Routing/MatcherDumper.php +++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php @@ -111,12 +111,7 @@ public function dump(array $options = array()) { 'pattern' => $compiled->getPattern(), 'pattern_outline' => $compiled->getPatternOutline(), 'number_parts' => $compiled->getNumParts(), - // This is only temporary. We need to strip off the compiled route from - // route object in order to serialize it. Cloning strips off the - // compiled route object. Remove this once - // https://github.com/symfony/symfony/pull/4755 is merged and brought - // back downstream. - 'route' => serialize(clone($route)), + 'route' => serialize($route), ); $insert->values($values); } diff --git a/core/lib/Drupal/Core/Routing/PathMatcher.php b/core/lib/Drupal/Core/Routing/PathMatcher.php index cef1a0a07cced30a08870189cb06d7d54a97970c..f037d9acb4100ec70c77c7e7053cd0d77ac6ae2e 100644 --- a/core/lib/Drupal/Core/Routing/PathMatcher.php +++ b/core/lib/Drupal/Core/Routing/PathMatcher.php @@ -75,7 +75,7 @@ public function matchRequestPartial(Request $request) { } } - if (!count($collection->all())) { + if (!count($collection)) { throw new ResourceNotFoundException(); }