Fixed Account::preDispatchController() updates breaks /account URL for XF2.2.x

Xon

Well-known member
Licensed customer
Affected version
2.2.20 (2026-11)
The update includes this snippet;

PHP:
    protected function preDispatchController($action, ParameterBag $params)
    {
        $this->response()->header('Cache-Control', 'no-store');

        $this->assertRegistrationRequired();
}

Except $this->response() doesn't exist, and will throw this error;
Code:
Error: Call to undefined method XF\Pub\Controller\Account::response() in src/XF/Pub/Controller/Account.php at line 16
XF\Pub\Controller\Account->preDispatchController() in src/XF/Pub/Controller/AbstractController.php at line 34
XF\Pub\Controller\AbstractController->preDispatchType() in src/XF/Mvc/Controller.php at line 126
XF\Mvc\Controller->preDispatch() in src/XF/Pub/Controller/Account.php at line 26
XF\Pub\Controller\Account->preDispatch() in src/XF/Mvc/Dispatcher.php at line 351
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 258
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2523
XF\App->run() in src/XF.php at line 524
XF::runApp() in index.php at line 20

This is a repeat of this bug;
 
Back
Top Bottom