Notice (1024) : Undefined property: UsersController::$Authentication in /var/www/html/src/Controller/UsersController.php on line 564 [in /var/www/html/vendor/cakephp/cakephp/src/Controller/Controller.php, line 342]
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 71]
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 164]
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 197]
Error: Call to a member function getResult() on null

Call to a member function getResult() on null 📋

Error
Error in: APP/Controller/UsersController.php, line 564
APP/Controller/UsersController.php at line 564 (edit)
     * @return \Cake\Http\Response|null|void
     */
    public function logout()
    {
        $result $this->Authentication->getResult();
        if ($result && $result->isValid()) {
            $this->Authentication->logout();
        }
        return $this->redirect(['action' => 'login']);

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