Warning (2) : Undefined array key "HTTP_REFERER" [in /var/www/html/src/Controller/AppController.php, line 80]
Warning (512) : Unable to emit headers. Headers sent in file=/var/www/html/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /var/www/html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/html/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/html/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Error: Cake\Controller\Controller::redirect(): Argument #1 ($url) must be of type Psr\Http\Message\UriInterface|array|string, null given, called in /var/www/html/src/Controller/AppController.php on line 80

Cake\Controller\Controller::redirect(): Argument #1 ($url) must be of type Psr\Http\Message\UriInterface|array|string, null given, called in /var/www/html/src/Controller/AppController.php on line 80 📋

TypeError
Error in: CORE/src/Controller/Controller.php, line 644
CORE/src/Controller/Controller.php at line 644 (edit)
     * @param int $status HTTP status codeDefaults to `302`.
     * @return \Cake\Http\Response|null
     * @link https://book.cakephp.org/5/en/controllers.html#Controller::redirect
     */
    public function redirect(UriInterface|array|string $urlint $status 302): ?Response
    {
        $this->autoRender false;
        if ($status 300 || $status 399) {

If you want to customize this error message, create templates/Error/error500.php