1. YoureCom
    1. About me
  2. Work Place
  3. Support
  4. Work Place
  • Login
  • Register
  • Search
Clan Management
  • Everywhere
  • Clan Management
  • Clan Management
  • Pages
  • Forum
  • Tasks
  • Products
  • More Options
  1. YoureCom - Plugins for the WoltLab Suite Core (WSC)
  2. Workplace
  3. Clan Management

Replacement of HeaderUtil::redirect #161

  • Marcel Beckers
  • January 15, 2023 at 12:40 PM
  • 0 Comments
  • Done
  • Overview

HeaderUtil::redirect should be replaced by RedirectResponse

Die Funktion HeaderUtil::redirect sollte durch RedirectResponse ersetzt werden.

Bislang

PHP
<?php

namespace wcf\action;

use wcf\system\request\LinkHandler;
use wcf\util\HeaderUtil;

final class ExampleRedirectAction extends AbstractAction
{
    public function execute()
    {
        parent::execute();

        // Redirect to the landing page.
        HeaderUtil::redirect(
            LinkHandler::getInstance()->getLink()
        );

        exit;
    }
}
Display More


Abofort

PHP
<?php

namespace wcf\action;

use Laminas\Diactoros\Response\RedirectResponse;
use wcf\system\request\LinkHandler;

final class ExampleRedirectAction extends AbstractAction
{
    public function execute()
    {
        parent::execute();

        // Redirect to the landing page.
        return new RedirectResponse(
            LinkHandler::getInstance()->getLink()
        );
    }
}
Display More
  • Share

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login

Last completed Tasks

  1. Revision of own events Guestbook

    Marcel Beckers January 15, 2023 at 12:49 PM
  2. Revision of own events Workplace

    Marcel Beckers January 15, 2023 at 12:49 PM
  3. PHP Database API Post

    Marcel Beckers January 15, 2023 at 12:33 PM
  4. Replacement of HeaderUtil::redirect Clan Management

    Marcel Beckers January 15, 2023 at 12:40 PM
  5. Implementation of the Infraction System Clan Management

    Marcel Beckers December 15, 2021 at 4:12 PM
  6. Implementation of the Infraction System Competitions Based System

    Marcel Beckers December 15, 2021 at 4:09 PM
  1. Contact
  2. Privacy Policy
  3. Legal Notice
  4. Terms and Conditions (T&C)
Workplace
Powered by WoltLab Suite™
Design by DragNord.com