Warning (2) : Undefined variable $request [in /var/www/darkplanet/src/Model/Table/BbpostsTable.php, line 127]
Warning (512) : Unable to emit headers. Headers sent in file=/var/www/darkplanet/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /var/www/darkplanet/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/darkplanet/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/darkplanet/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 164]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/darkplanet/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/darkplanet/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197]
Error: Call to a member function getSession() on null

Call to a member function getSession() on null 📋

Error
Error in: ROOT/src/Model/Table/BbpostsTable.php, line 127
APP/Model/Table/BbpostsTable.php at line 127 (edit)
    }
    public function findSearch(Query $query)
    {
                    if (!$request->getSession()->read('Auth.User.is_admin')) {
                throw new ForbiddenException(__('Access denied'));
            }
        $subQuery = "((1.3 * (MATCH(post_text) AGAINST ('" . Router::getRequest()->getQuery('q') . "' IN BOOLEAN MODE))) + (0.6 * (MATCH(Bbtopics.topic_title) AGAINST ('" . Router::getRequest()->getQuery('q') . "' IN BOOLEAN MODE))))";
        $expr = $query->newExpr($subQuery);

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