Notice (1024) : Undefined property `FeaturesController::$FormProtection` in `/cakemodule/src/Controller/Admin/FeaturesController.php` on line 37 [in /cakemodule/vendor/cakephp/cakephp/src/Controller/Controller.php, line 311]
Warning (512) : Unable to emit headers. Headers sent in file=/cakemodule/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /cakemodule/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65]
Warning (2) : Cannot modify header information - headers already sent by (output started at /cakemodule/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /cakemodule/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159]
Warning (2) : Cannot modify header information - headers already sent by (output started at /cakemodule/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /cakemodule/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Warning (2) : Cannot modify header information - headers already sent by (output started at /cakemodule/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /cakemodule/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Error: Call to a member function setConfig() on null

Call to a member function setConfig() on null 📋

Error
Error in: APP/Controller/Admin/FeaturesController.php, line 37
APP/Controller/Admin/FeaturesController.php at line 37 (edit)
    }
            public function beforeFilter(\Cake\Event\EventInterface $event)
    {
        parent::beforeFilter($event);
        $this->FormProtection->setConfig('unlockedActions', ['index']); // 無効にしたいアクション名をセット
        $this->Authentication->addUnauthenticatedActions(['index','create']);
    }
    
    

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