e107inc/e107

View on GitHub
e107_admin/frontpage.php

Summary

Maintainability
A
0 mins
Test Coverage
F
30%

'index.php' passed to foreach instead of array
Open

        foreach($front_value['page'] as &$multipage)
Severity: Minor
Found in e107_admin/frontpage.php by phan

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

            $fp_settings[$i] = array('order' => $i, 'class' => $class, 'page' => $val, 'force' => varset($frontPref['frontpage_force'][$class], ''));
Severity: Info
Found in e107_admin/frontpage.php by phan

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

if(!getperms('G'))
Severity: Minor
Found in e107_admin/frontpage.php by phan

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

                    ".$this->frm->radio($ob_name, $front_key, $type_selected, array('label'=>$front_value['title']))."
Severity: Minor
Found in e107_admin/frontpage.php by phan

Method \frontpage_adminlog is declared to return \none but has no return value
Open

function frontpage_adminlog($msg_num = '00', $woffle = '')
Severity: Minor
Found in e107_admin/frontpage.php by phan

Argument 2 (search) is ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int> but \array_key_exists() takes array
Open

    elseif(array_key_exists($temp['order'], $fp_settings))
Severity: Minor
Found in e107_admin/frontpage.php by phan

Variable $tp is undeclared
Open

        $_POST['fp_force_page_other'] = trim($tp->toForm($_POST['fp_force_page_other']));
Severity: Minor
Found in e107_admin/frontpage.php by phan

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

    $var['main']['text'] = LAN_MANAGE;
Severity: Info
Found in e107_admin/frontpage.php by phan

Argument 1 (var) is ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int> but \count() takes \Countable|array
Open

            if(($mv > 1) && ($mv <= count($fp_settings)))
Severity: Minor
Found in e107_admin/frontpage.php by phan

Variable $tp is undeclared
Open

        $_POST['frontpage_other'] = trim($tp->toForm($_POST['frontpage_other']));
Severity: Minor
Found in e107_admin/frontpage.php by phan

string passed to foreach instead of array
Open

                foreach($front_value['page'] as $multipage)
Severity: Minor
Found in e107_admin/frontpage.php by phan

Suspicious array access to nullable ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int>
Open

                $temp = $fp_settings[$mv + 1];
Severity: Minor
Found in e107_admin/frontpage.php by phan

Argument 1 (var) is ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int> but \count() takes \Countable|array
Open

            if(($mv > 0) && ($mv < count($fp_settings)))
Severity: Minor
Found in e107_admin/frontpage.php by phan

Saw an @param annotation for curval, but it was not found in the param list of function add_other(string $ob_name, $cur_val, string $cur_page) : string
Open

     *    @param string $curval - current 'selected' value
Severity: Info
Found in e107_admin/frontpage.php by phan

Argument 4 (options) is array{label:'Custom URL'|'Disabled or Enter Custom URL'} but \e_form::radio() takes null defined at /code/e107_handlers/form_handler.php:2928
Open

            <td>".$this->frm->radio($ob_name, 'other', $cur_val, array('label'=> $label))."</td>
Severity: Minor
Found in e107_admin/frontpage.php by phan

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

                    ".$this->frm->radio($ob_name, $front_key, $type_selected, array('label'=>$front_value['title']))."
Severity: Minor
Found in e107_admin/frontpage.php by phan

Saw an @param annotation for front_key, but it was not found in the param list of function add_other(string $ob_name, $cur_val, string $cur_page) : string
Open

     *    @param string $front_key 
Severity: Info
Found in e107_admin/frontpage.php by phan

Suspicious array access to nullable ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int>
Open

                $temp = $fp_settings[$mv - 1];
Severity: Minor
Found in e107_admin/frontpage.php by phan

Suspicious array access to nullable ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int>
Open

                $fp_settings[$mv - 1] = $fp_settings[$mv];
Severity: Minor
Found in e107_admin/frontpage.php by phan

array to string conversion
Open

        frontpage_adminlog('03', "posn => {$temp},[!br!]class => {$_POST['class']},[!br!]page => {$frontpage_value},[!br!]force => {$forcepage_value}");
Severity: Info
Found in e107_admin/frontpage.php by phan

Argument 1 (var) is ?array|?array<int>|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{order:0,class:0,page:mixed,force:''}[]|?array{order:1,class:0,page:mixed,force:mixed}[]|?array{order:1|null,class:0,page:'news.php'|mixed,force:''}[]|?array{order:int,class:mixed,page:'index.php'|'news.php'|mixed|string,force:string}[]|?array{}</int></int></int> but \count() takes \Countable|array
Open

    for($i = 1, $iMax = count($fp_settings); $i <= $iMax; $i ++)
Severity: Minor
Found in e107_admin/frontpage.php by phan

Reference to undeclared constant \ADMIN_EDIT_ICON
Open

                                <a class='btn btn-default' title='".LAN_EDIT."' href='".e_SELF."?id=".$order."' >".ADMIN_EDIT_ICON."</a>
Severity: Minor
Found in e107_admin/frontpage.php by phan

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

            $forcepage_value = $front_page[$_POST['fp_force_page']]['page'][$_POST['fp_force_page_multipage'][$_POST['fp_force_page']]]['page'];
Severity: Minor
Found in e107_admin/frontpage.php by phan

Reference to undeclared constant \ADMIN_DELETE_ICON
Open

                                ".$frm->admin_button('fp_delete_rule['.$order.']',$order,'',ADMIN_DELETE_ICON)."                    
Severity: Minor
Found in e107_admin/frontpage.php by phan

Suspicious array access to nullable ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int>
Open

                $fp_settings[$mv + 1] = $fp_settings[$mv];
Severity: Minor
Found in e107_admin/frontpage.php by phan

Argument 1 (var) is ?array|?array<int>|?array<int>|?array{1:array{order:1,class:0,page:mixed,force:mixed}}|?array{}</int></int> but \count() takes \Countable|array
Open

        for($i = 1, $iMax = count($fp_settings); $i <= $iMax; $i ++)
Severity: Minor
Found in e107_admin/frontpage.php by phan

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

            $frontpage_value = $front_page[$_POST['frontpage']]['page'][$_POST['frontpage_multipage'][$_POST['frontpage']]]['page'];
Severity: Minor
Found in e107_admin/frontpage.php by phan

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

function frontpage_adminlog($msg_num = '00', $woffle = '')
Severity: Minor
Found in e107_admin/frontpage.php by phan

There are no issues that match your filters.

Category
Status