e107inc/e107

View on GitHub
e107_plugins/forum/forum_post.php

Summary

Maintainability
A
40 mins
Test Coverage
F
0%

Consider simplifying this complex logical expression.
Open

        if ((isset($_POST['newthread']) && trim($_POST['subject']) == '') || trim($_POST['post']) == '')
        {
            message_handler('ALERT', 5);
        }
        else
Severity: Major
Found in e107_plugins/forum/forum_post.php - About 40 mins to fix

    Reference to undeclared property \forum_post_handler->post (Did you mean $_POST)
    Open

                    $data['initial_post']   = $this->forumObj->threadDetermineInitialPost($this->post);
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Argument 4 (options) is array{label:string} but \e_form::radio() takes null defined at /code/e107_handlers/form_handler.php:2942
    Open

            ".$frm->radio('rename_thread', 'add', false, array('label'=> $tp->lanVars(LAN_FORUM_5024,'<b> ['.LAN_FORUM_5021.']</b> '))). "
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Argument 2 (caption) is ?string but \forum_post_handler::render() takes bool|false defined at /code/e107_plugins/forum/forum_post.php:1013
    Open

            $this->render($text, $caption);
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Reference to undeclared property \forum_post_handler->post (Did you mean $_POST)
    Open

            if (!empty($this->post))
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Argument 4 (options) is 'label=Do not rename thread title' but \e_form::radio() takes null defined at /code/e107_handlers/form_handler.php:2942
    Open

            ".$frm->radio('rename_thread','none',true, 'label='.LAN_FORUM_5022)."
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Suspicious array access to ?mixed
    Open

                                $_fname = (isset($upload['rawname']) ? $upload['rawname'] : $upload['name']);
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Call with 2 arg(s) to \e_parse::toForm() which only takes 1 arg(s) defined at /code/e107_handlers/e_parse_class.php:755
    Open

            ".$frm->text('new_thread_title', $tp->toForm($this->data['thread_name'], 250))."
    Severity: Info
    Found in e107_plugins/forum/forum_post.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

            $fList = $sql->retrieve($qry,true);
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Suspicious array access to ?mixed
    Open

                                $_txt = '[br][file='.$fpath.$upload['name'].']'.$_fname.'[/file]';
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Suspicious array access to ?mixed
    Open

                                $_file = $upload['name'];
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Saw an @param annotation for id, but the param list of function updateReply() is empty
    Open

         * @param $id of the post
    Severity: Info
    Found in e107_plugins/forum/forum_post.php by phan

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

            $postVals['post_edit_datestamp']    = time();
    Severity: Info
    Found in e107_plugins/forum/forum_post.php by phan

    Suspicious array access to ?mixed
    Open

                                $ret[] = array('type' => $_type, 'txt' => $_txt, 'file' => $_file, 'thumb' => $_thumb, 'fname' => $upload['origname'], 'size'=>$upload['size']);
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Found a return statement with a value in the implementation of the magic method \forum_post_handler::__construct, expected void return type
    Open

        function __construct()
    Severity: Info
    Found in e107_plugins/forum/forum_post.php by phan

    Call with 2 arg(s) to \e_parse::toForm() which only takes 1 arg(s) defined at /code/e107_handlers/e_parse_class.php:755
    Open

            ".$frm->text('newtitle', $tp->toForm($this->data['thread_name'], 250))."
    Severity: Info
    Found in e107_plugins/forum/forum_post.php by phan

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

                $threadLink = e107::url('forum','topic',$this->data,'full')."&amp;last=1";
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Reference to undeclared property \forum_post_handler->post (Did you mean $_POST)
    Open

            $this->post     = (int) $_GET['post']; // post ID if needed.
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Argument 4 (options) is array{label:'Rename to:'} but \e_form::radio() takes null defined at /code/e107_handlers/form_handler.php:2942
    Open

            <div class='radio'>".$frm->radio('rename_thread','rename', false, array('label'=>LAN_FORUM_5025))."
    Severity: Minor
    Found in e107_plugins/forum/forum_post.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_post.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_post.php by phan

    Argument 1 (template) is array but \e_parse::simpleParse() takes string defined at /code/e107_handlers/e_parse_class.php:886
    Open

            $text = $tp->simpleParse($FORUM_PREVIEW,$shortcodes);
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Reference to undeclared property \forum_post_handler->post (Did you mean $_POST)
    Open

                $moderatorUserIds = $forum->getModeratorUserIdsByPostId($this->post);
    Severity: Minor
    Found in e107_plugins/forum/forum_post.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_post.php by phan

    Reference to undeclared property \forum_post_handler->post (Did you mean $_POST)
    Open

                    $postInfo               = $this->forumObj->postGet($this->post, 'post');
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    Argument 2 (value) is 1 but \e_form::button() takes array|string defined at /code/e107_handlers/form_handler.php:3876
    Open

                                        ".$frm->button('report_thread',1,'submit',LAN_FORUM_2029)."
    Severity: Minor
    Found in e107_plugins/forum/forum_post.php by phan

    There are no issues that match your filters.

    Category
    Status