diff --git c/core/modules/system/lib/Drupal/system/Controller/ThemeController.php w/core/modules/system/lib/Drupal/system/Controller/ThemeController.php index 7cb00c8..39749e8 100644 --- c/core/modules/system/lib/Drupal/system/Controller/ThemeController.php +++ w/core/modules/system/lib/Drupal/system/Controller/ThemeController.php @@ -12,6 +12,7 @@ use Drupal\Core\Access\CsrfTokenGenerator; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpFoundation\RedirectResponse; /** * Controller for theme handling. @@ -55,7 +56,8 @@ public function disable(Request $request) { drupal_set_message($this->t('The %theme theme was not found.', array('%theme' => $theme)), 'error'); } - return $this->redirect($this->urlGenerator()->generateFromPath('admin/appearance', array('absolute' => TRUE))); + // @todo switch to $this->redirect when admin/appearance converted. + return new RedirectResponse($this->urlGenerator()->generateFromPath('admin/appearance', array('absolute' => TRUE))); } throw new AccessDeniedHttpException(); @@ -91,7 +93,8 @@ public function enable(Request $request) { drupal_set_message($this->t('The %theme theme was not found.', array('%theme' => $theme)), 'error'); } - return $this->redirect($this->urlGenerator()->generateFromPath('admin/appearance', array('absolute' => TRUE))); + // @todo switch to $this->redirect when admin/appearance converted. + return new RedirectResponse($this->urlGenerator()->generateFromPath('admin/appearance', array('absolute' => TRUE))); } throw new AccessDeniedHttpException(); @@ -153,7 +156,8 @@ public function defaultTheme(Request $request) { else { drupal_set_message($this->t('The %theme theme was not found.', array('%theme' => $theme)), 'error'); } - return $this->redirect($this->urlGenerator()->generateFromPath('admin/appearance', array('absolute' => TRUE))); + // @todo switch to $this->redirect when admin/appearance converted. + return new RedirectResponse($this->urlGenerator()->generateFromPath('admin/appearance', array('absolute' => TRUE))); } throw new AccessDeniedHttpException(); }