e107inc/e107

View on GitHub
e107_plugins/forum/forum_class.php

Summary

Maintainability
A
0 mins
Test Coverage
F
8%

Variable $ret was undeclared, but array fields are being added to it.
Open

                $ret['html'] = false;
Severity: Info
Found in e107_plugins/forum/forum_class.php by phan

Call to undeclared method \e_db::db_getList
Open

                $threadList = $sql->db_getList();
Severity: Critical
Found in e107_plugins/forum/forum_class.php by phan

Argument 2 (fields) is true but \e_db::retrieve() takes string defined at /code/e107_handlers/e_db_interface.php:153
Open

            return e107::getDb()->retrieve($qry, true);
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

array to false comparison
Open

            if($postInfo !== false)
Severity: Info
Found in e107_plugins/forum/forum_class.php by phan

Argument 3 (default) is 'Forum' but \e107::pref() takes null defined at /code/e107_handlers/e107_class.php:4016
Open

        $forumTitle = e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME);
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

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

            $url = e107::url('forum','index','full');
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Argument 1 (title) is null but \eHelper::title2sef() takes string defined at /code/e107_handlers/application.php:4989
Open

        return eHelper::title2sef($threadInfo['thread_name'],'dashl');
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Reference to undeclared property \e107forum->e107
Open

        $this->e107 = e107::getInstance();
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Variable $ret was undeclared, but array fields are being added to it.
Open

                $ret['html'] = $tp->parseTemplate($tmpl, true, $sc) . "\n";
Severity: Info
Found in e107_plugins/forum/forum_class.php by phan

Call to undeclared method \e_db::db_getList
Open

            $tlist = $sql->db_getList();
Severity: Critical
Found in e107_plugins/forum/forum_class.php by phan

Argument 2 (fields) is true but \e_db::retrieve() takes string defined at /code/e107_handlers/e_db_interface.php:153
Open

        $data = e107::getDb()->retrieve("SELECT forum_id, forum_sef, forum_class FROM `#forum`", true); // no ordering for better performance.
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

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

            $url = e107::url('forum','index','full');
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

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

        if(!in_array(USERID, $moderatorUserIds) && !getperms('0'))
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Suspicious array access to nullable ?array|?bool
Open

                    $sql->update('forum', "forum_lastpost_user = 0, forum_lastpost_user_anon = '{$row['thread_lastuser_anon']}', forum_lastpost_info = '{$lp_info}' WHERE forum_id=".$id);
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Argument 1 (str) is int but \trim() takes string
Open

        if($uclass == e_UC_ADMIN || trim($uclass) == '')
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Suspicious array access to nullable ?array|?bool
Open

                if($row['thread_lastuser_anon'])
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Argument 1 (classes) is int but \user_class::getUsersInClass() takes string defined at /code/e107_handlers/userclass_class.php:1192
Open

            $this->modArray = e107::getUserClass()->getUsersInClass($uclass, 'user_name', true);
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Variable $parentList was undeclared, but array fields are being added to it.
Open

                        $parentList[] = $row['forum_id'];
Severity: Info
Found in e107_plugins/forum/forum_class.php by phan

Suspicious array access to nullable ?array
Open

            switch ($_POST['action']) 
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

Call to undeclared method \e_db::db_getList
Open

            $ret = $sql->db_getList();
Severity: Critical
Found in e107_plugins/forum/forum_class.php by phan

Saw an @param annotation for updateForumLastPost, but it was not found in the param list of function threadDelete($threadId, bool|mixed $updateForumLastpost = null) : true
Open

     * @param $updateForumLastPost boolean
Severity: Info
Found in e107_plugins/forum/forum_class.php by phan

Saw unextractable annotation for comment '* @return "null" if this post does not exist, "true" if post could deleted, otherwise "false"'
Open

     * @return "null" if this post does not exist, "true" if post could deleted, otherwise "false"
Severity: Info
Found in e107_plugins/forum/forum_class.php by phan

Call to undeclared method \e_db::db_getList
Open

            $flist = $sql->db_getList();
Severity: Critical
Found in e107_plugins/forum/forum_class.php by phan

Argument 2 (fields) is true but \e_db::retrieve() takes string defined at /code/e107_handlers/e_db_interface.php:153
Open

        $data = $sql->retrieve('SELECT t.*, u.user_id, u.user_name, u.user_email, u.user_lastvisit FROM `#forum_track` AS t LEFT JOIN `#user` AS u ON t.track_userid = u.user_id WHERE t.track_thread='.intval($post['post_thread']), true);
Severity: Minor
Found in e107_plugins/forum/forum_class.php by phan

There are no issues that match your filters.

Category
Status