e107inc/e107

View on GitHub
e107_plugins/forum/forum_viewforum.php

Summary

Maintainability
A
0 mins
Test Coverage
F
19%

Returning type null but init() is declared to return array
Open

        return null;
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Suspicious array access to nullable ?array{thread_options:array{}}|?array{thread_options:mixed}|?mixed
Open

            if($thread_info['thread_sticky'])
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Suspicious array access to nullable ?array<string>|?array<string>|?mixed</string></string>
Open

            $threadId = $thread_info['thread_id'];
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Saw an @param annotation for urlparms, but the param list of function init() : array is empty
Open

 * @param $urlparms

Saw an @param annotation for doNothing, but the param list of function init() : array is empty
Open

 * @param $doNothing

Returning type null but init() is declared to return array
Open

            return null;
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

    define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds) || getperms('0')));
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Argument 4 (filter) is ?string but \e107forum::forumGetThreads() takes null defined at /code/e107_plugins/forum/forum_class.php:2045
Open

    $threadList = $forum->forumGetThreads($forumId, $threadFrom, $view, $threadFilter);
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Unused variable
Open

                    $doNothing; // do nothing.

Suspicious array access to nullable ?array<string>|?array<string>|?mixed</string></string>
Open

        switch($thread_info['thread_sticky'])
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Argument 3 (row) is null but \e107::url() takes array defined at /code/e107_handlers/e107_class.php:4225
Open

        $url = e107::url('forum', 'index', null, ['mode' => 'full']);
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Saw an @param annotation for FORUM_VIEW_START, but the param list of function init() : array is empty
Open

 * @param $FORUM_VIEW_START

Returning type null but init() is declared to return array
Open

        return null;
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Argument 3 (row) is null but \e107::url() takes array defined at /code/e107_handlers/e107_class.php:4225
Open

        $url = e107::url('forum', 'index', null, ['mode' => 'full']);
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Suspicious array access to nullable ?array{thread_options:array{}}|?array{thread_options:mixed}|?mixed
Open

            if(!$thread_info['thread_sticky'])
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

Call to deprecated function \e_parse::text_truncate() defined at /code/e107_handlers/e_parse_class.php:1286
Open

        define("META_DESCRIPTION", $tp->text_truncate(
Severity: Minor
Found in e107_plugins/forum/forum_viewforum.php by phan

There are no issues that match your filters.

Category
Status