diff core/modules/big_pipe/src/Controller/BigPipeController.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
line wrap: on
line diff
--- a/core/modules/big_pipe/src/Controller/BigPipeController.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/big_pipe/src/Controller/BigPipeController.php	Thu May 09 15:34:47 2019 +0100
@@ -42,7 +42,7 @@
     //   the cookie was already set, yet the user is executing this controller;
     // - there is no session, in which case BigPipe is not enabled anyway, so it
     //   is pointless to set this cookie.
-    if ($request->cookies->has(BigPipeStrategy::NOJS_COOKIE) || $request->getSession() === NULL) {
+    if ($request->cookies->has(BigPipeStrategy::NOJS_COOKIE) || !$request->hasSession()) {
       throw new AccessDeniedHttpException();
     }
 
@@ -52,7 +52,7 @@
 
     $response = new LocalRedirectResponse($request->query->get('destination'));
     // Set cookie without httpOnly, so that JavaScript can delete it.
-    $response->headers->setCookie(new Cookie(BigPipeStrategy::NOJS_COOKIE, TRUE, 0, '/', NULL, FALSE, FALSE));
+    $response->headers->setCookie(new Cookie(BigPipeStrategy::NOJS_COOKIE, TRUE, 0, '/', NULL, FALSE, FALSE, FALSE, NULL));
     $response->addCacheableDependency((new CacheableMetadata())->addCacheContexts(['cookies:' . BigPipeStrategy::NOJS_COOKIE, 'session.exists']));
     return $response;
   }