Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / routing / CompiledRoute.php
index 3eca9ecd8b010b0fac851d0f938631b042da1304..8ecf5153ce2f73d2a368d6a9ac19df889c7dc7a7 100644 (file)
@@ -28,8 +28,6 @@ class CompiledRoute implements \Serializable
     private $hostTokens;
 
     /**
-     * Constructor.
-     *
      * @param string      $staticPrefix  The static prefix of the compiled route
      * @param string      $regex         The regular expression to use to match this route
      * @param array       $tokens        An array of tokens to use to generate URL for this route
@@ -73,7 +71,12 @@ class CompiledRoute implements \Serializable
      */
     public function unserialize($serialized)
     {
-        $data = unserialize($serialized);
+        if (\PHP_VERSION_ID >= 70000) {
+            $data = unserialize($serialized, array('allowed_classes' => false));
+        } else {
+            $data = unserialize($serialized);
+        }
+
         $this->variables = $data['vars'];
         $this->staticPrefix = $data['path_prefix'];
         $this->regex = $data['path_regex'];