e107inc/e107

View on GitHub
e107_plugins/newsletter/admin_config.php

Summary

Maintainability
A
0 mins
Test Coverage
F
11%

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

if (!getperms('P')) 

Argument 2 (fname) is true but \e107::lan() takes string defined at /code/e107_handlers/e107_class.php:3987
Open

e107::lan('newsletter',true);

Reference to undeclared constant \ADMIN_DELETE_ICON_PATH
Open

                        <input class='btn btn-default btn-secondary btn-large' type='image' title='".LAN_DELETE."' name='delete[newsletter_".$data['newsletter_id']."]' src='".ADMIN_DELETE_ICON_PATH."' onclick=\"return jsconfirm(".$tp->toAttribute($tp->toJSON(LAN_CONFIRMDEL." [ID: ".$data['newsletter_id']." ]")).") \"/>

Suspicious array access to bool
Open

            $mes->addSuccess(str_replace('[x]', $counters['add'], NLLAN_40));

Method \newsletter::show_options is declared to return \none but has no return value
Open

    function show_options($action)

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

                        $newsletterArray[$p_id]['newsletter_subscribers'] = chr(1).$val;    // keep this single value in the list

Reference to undeclared constant \ADMIN_DELETE_ICON_PATH
Open

                    <td><a class='btn btn-large' href='".e_SELF."?edit.".$data['newsletter_id']."'>".ADMIN_EDIT_ICON."</a><input type='image' title='".LAN_DELETE."' name='delete[issue_".$data['newsletter_id']."]' src='".ADMIN_DELETE_ICON_PATH."' onclick=\"return jsconfirm(".$tp->toAttribute($tp->toJSON(NLLAN_19." [ID: ".$data['newsletter_id']." ]")).") \"/>

Reference to undeclared constant \ADMIN_EDIT_ICON
Open

                    <td><a class='btn btn-large' href='".e_SELF."?edit.".$data['newsletter_id']."'>".ADMIN_EDIT_ICON."</a><input type='image' title='".LAN_DELETE."' name='delete[issue_".$data['newsletter_id']."]' src='".ADMIN_DELETE_ICON_PATH."' onclick=\"return jsconfirm(".$tp->toAttribute($tp->toJSON(NLLAN_19." [ID: ".$data['newsletter_id']." ]")).") \"/>

Suspicious array access to bool
Open

        if ($counters['add'] == 0)

Argument 3 (subject) is int but \str_replace() takes array|string
Open

        $issue = intval(str_replace('nlmailnow_', '', $issue));

When fetching an array index from a value of type false|int|string, found an array index of type 'key', but expected the index to be of type int
Open

            $id = intval(str_replace('newsletter_', '', $tmp['key']));

Return type of show_options() is undeclared type \none
Open

    function show_options($action)

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

        $var['main']['text'] = NLLAN_44;

Saw an @param annotation for _POST, but the param list of function createNewsletter() : \none is empty
Open

     * @param int $_POST['editid'] - ID of newsletter if existing - indicates edit to be saved

Variable $text is undeclared
Open

        $ns->tablerender($caption, $mes->render() . $text);

Function admin_config_adminmenu defined at /code/e107_plugins/newsletter/admin_config.php:729 was previously defined at /code/e107_plugins/poll/admin_config.php:230
Open

function admin_config_adminmenu()

Argument 2 (value) is array|null|string|string[] but \e_form::number() takes int defined at /code/e107_handlers/form_handler.php:925
Open

            <td>".$frm->number('newsletter_', $newsletter_issue, '200')."</td>

Reference to undeclared constant \ADMIN_EDIT_ICON
Open

                        <a class='btn btn-default btn-secondary btn-large' href='".e_SELF."?edit.".$data['newsletter_id']."'>".ADMIN_EDIT_ICON."</a>

Argument 3 (maxlength) is '200' but \e_form::number() takes int defined at /code/e107_handlers/form_handler.php:925
Open

            <td>".$frm->number('newsletter_', $newsletter_issue, '200')."</td>

When fetching an array index from a value of type false|int|string, found an array index of type 'key', but expected the index to be of type int
Open

        if(strpos($tmp['key'], 'newsletter') === 0)

Reference to undeclared constant \ADMIN_DELETE_ICON
Open

                                <td><a href='".e_SELF."?remove.{$p_id}.{$val}'>".ADMIN_DELETE_ICON."</a>".(($nl_row['user_ban'] > 0) ? NLLAN_62 : "")."</td>

Method \newsletter::createNewsletter is declared to return \none but has no return value
Open

    function createNewsletter()

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

        $letter['newsletter_title'] =  $tp->toDB($_POST['newsletter_title']);

Saw possibly unextractable annotation for a fragment of comment '* @param int id of issue': after int, did not see an element name (will guess based on comment order)
Open

     * @param int id of issue

Method \newsletter::editNewsletter is declared to return \none but has no return value
Open

    function editNewsletter($id)

Return type of editNewsletter() is undeclared type \none
Open

    function editNewsletter($id)

When fetching an array index from a value of type false|int|string, found an array index of type 'key', but expected the index to be of type int
Open

            $id = intval(str_replace('issue_', '', $tmp['key']));

Call to deprecated function \show_admin_menu() defined at /code/e107_admin/boot.php:354
Open

        show_admin_menu(NLLAN_47, $action, $var);

Return type of createNewsletter() is undeclared type \none
Open

    function createNewsletter()

Call to undeclared method \e_db::db_getList
Open

        $nlArray = $sql -> db_getList();
Severity: Critical
Found in e107_plugins/newsletter/admin_config.php by phan

Variable $caption is undeclared
Open

        $ns->tablerender($caption, $mes->render() . $text);

Call to undeclared method \e_db::db_getList
Open

            $nlArray = $sql->db_getList();
Severity: Critical
Found in e107_plugins/newsletter/admin_config.php by phan

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

        $letter['newsletter_title']        = $tp->toDB($_POST['newsletter_title']);

Call to undeclared method \e_db::db_getList
Open

            $nlArray = $sql->db_getList(); 
Severity: Critical
Found in e107_plugins/newsletter/admin_config.php by phan

Variable $mailout is undeclared
Open

        $mail_style .= "<div><b>{$mailout['mail_subject']}<br />[ ".NLLAN_12." ".$newsletterInfo['newsletter_issue']." ]</b></div><br /><br />";

There are no issues that match your filters.

Category
Status