From 8ae0b323f23cdcd379a0693780fcce1fc5fddeda Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Wed, 4 Jul 2012 16:33:48 -0500 Subject: [PATCH] Don't serialize the compiled route object along with the route. --- core/lib/Drupal/Core/Routing/MatcherDumper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/lib/Drupal/Core/Routing/MatcherDumper.php b/core/lib/Drupal/Core/Routing/MatcherDumper.php index d3e292b5f032..28d46e431582 100644 --- a/core/lib/Drupal/Core/Routing/MatcherDumper.php +++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php @@ -99,7 +99,12 @@ class MatcherDumper implements MatcherDumperInterface { 'pattern' => $compiled->getPattern(), 'pattern_outline' => $compiled->getPatternOutline(), 'number_parts' => $compiled->getNumParts(), - 'route' => serialize($route), + // 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)), ); $insert->values($values); }