diff --git a/core/lib/Drupal/Core/Session/Session.php b/core/lib/Drupal/Core/Session/Session.php index da4b0e3..8aece13 100644 --- a/core/lib/Drupal/Core/Session/Session.php +++ b/core/lib/Drupal/Core/Session/Session.php @@ -93,4 +93,17 @@ public function save() { parent::save(); } + + /** + * Overrides Symfony\Component\HttpFoundation\Session\Session::migrate(). + * + * Prevent regenerate if saving is disabled. + */ + public function migrate($destroy = false, $lifetime = null) { + if (!$this->isSaveEnabled()) { + return; + } + return $this->storage->regenerate($destroy, $lifetime); + } + }