e107inc/e107

View on GitHub
e107_plugins/gsitemap/admin_config.php

Summary

Maintainability
A
0 mins
Test Coverage
F
9%

Suspicious array access to false
Open

                    $sel = ($editArray['gsitemap_freq'] == $k)? "selected='selected'" : "";
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

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

            $srch[0] = "[URL]";

Assigning array<string></string> to property but \gsitemap_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:true,class:'center',toggle:'e-multiselect',readParms:array{},writeParms:array{}},gsitemap_id:array{title:'ID',type:'number',data:'int',width:'5%',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_name:array{title:'Title',type:'text',data:'safestr',width:'auto',inline:true,help:'',readParms:array{},writeParms:array{size:'xxlarge'},class:'left',thclass:'left'},gsitemap_url:array{title:'URL',type:'url',data:'safestr',width:'auto',inline:true,help:'',readParms:array{},writeParms:array{size:'xxlarge'},class:'left',thclass:'left'},gsitemap_table:array{title:'Table',tab:1,type:'text',data:'safestr',width:'auto',filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',batch:false},gsitemap_table_id:array{title:'ID',tab:1,type:'number',data:'int',width:'5%',readonly:false,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_lastmod:array{title:'Lastmod',tab:1,type:'datestamp',readonly:2,data:'int',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:false,batch:true},gsitemap_freq:array{title:'Freq.',type:'dropdown',data:'safestr',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:true,batch:true},gsitemap_priority:array{title:'Priority',type:'method',data:'safestr',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:true,batch:true},gsitemap_cat:array{title:'Category',tab:1,type:'text',data:'safestr',width:'auto',batch:true,filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_order:array{title:'Order',type:'number',data:'int',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_img:array{title:'Image',type:'image',data:'safestr',width:'auto',help:'',readParms:'thumb=80x80',writeParms:array{},class:'left',thclass:'left'},gsitemap_active:array{title:'Visibility',type:'userclass',data:'int',width:'auto',filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},options:array{title:'Options',type:null,data:null,width:'10%',thclass:'center last',class:'center last',forced:true,readParms:array{},writeParms:array{}}}
Open

            $this->fields['gsitemap_cat']['writeParms']['optArray'] = array('gsitemap_cat_0','gsitemap_cat_1', 'gsitemap_cat_2'); // Example Drop-down array. 
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Argument 4 (noWhere) is 'no-where' but \e_db::select() takes bool|false defined at /code/e107_handlers/e_db_interface.php:265
Open

            $sql->select("links", "*", "ORDER BY link_order ASC", "no-where");
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Suspicious array access to nullable ?array
Open

        else if(!vartrue($_POST['edit']))
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Suspicious array access to false
Open

            <td>".$frm->text('gsitemap_url', $editArray['gsitemap_url'], '100', array('class' => 'tbox input-text span3'))."
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Assigning array<string></string> to property but \gsitemap_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:true,class:'center',toggle:'e-multiselect',readParms:array{},writeParms:array{}},gsitemap_id:array{title:'ID',type:'number',data:'int',width:'5%',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_name:array{title:'Title',type:'text',data:'safestr',width:'auto',inline:true,help:'',readParms:array{},writeParms:array{size:'xxlarge'},class:'left',thclass:'left'},gsitemap_url:array{title:'URL',type:'url',data:'safestr',width:'auto',inline:true,help:'',readParms:array{},writeParms:array{size:'xxlarge'},class:'left',thclass:'left'},gsitemap_table:array{title:'Table',tab:1,type:'text',data:'safestr',width:'auto',filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',batch:false},gsitemap_table_id:array{title:'ID',tab:1,type:'number',data:'int',width:'5%',readonly:false,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_lastmod:array{title:'Lastmod',tab:1,type:'datestamp',readonly:2,data:'int',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:false,batch:true},gsitemap_freq:array{title:'Freq.',type:'dropdown',data:'safestr',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:true,batch:true},gsitemap_priority:array{title:'Priority',type:'method',data:'safestr',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:true,batch:true},gsitemap_cat:array{title:'Category',tab:1,type:'text',data:'safestr',width:'auto',batch:true,filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_order:array{title:'Order',type:'number',data:'int',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_img:array{title:'Image',type:'image',data:'safestr',width:'auto',help:'',readParms:'thumb=80x80',writeParms:array{},class:'left',thclass:'left'},gsitemap_active:array{title:'Visibility',type:'userclass',data:'int',width:'auto',filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},options:array{title:'Options',type:null,data:null,width:'10%',thclass:'center last',class:'center last',forced:true,readParms:array{},writeParms:array{}}}
Open

            $this->fields['gsitemap_table']['writeParms']['optArray'] = array('gsitemap_table_0','gsitemap_table_1', 'gsitemap_table_2'); // Example Drop-down array. 
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

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

            $repl[0] = "<a href='".$LINK_1."' target='_blank'>".$LINK_1."</a>";

Call to undeclared method \e_db::db_getList
Open

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

Method \gsitemap_ui::renderHelp is declared to return string but has no return value
Open

        public function renderHelp()
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Suspicious array access to false
Open

            <td>".r_userclass("gsitemap_active", $editArray['gsitemap_active'], 'off', "nobody,public,guest,member,admin,classes,language")."        </td>
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Assigning array<string></string> to property but \gsitemap_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:true,class:'center',toggle:'e-multiselect',readParms:array{},writeParms:array{}},gsitemap_id:array{title:'ID',type:'number',data:'int',width:'5%',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_name:array{title:'Title',type:'text',data:'safestr',width:'auto',inline:true,help:'',readParms:array{},writeParms:array{size:'xxlarge'},class:'left',thclass:'left'},gsitemap_url:array{title:'URL',type:'url',data:'safestr',width:'auto',inline:true,help:'',readParms:array{},writeParms:array{size:'xxlarge'},class:'left',thclass:'left'},gsitemap_table:array{title:'Table',tab:1,type:'text',data:'safestr',width:'auto',filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',batch:false},gsitemap_table_id:array{title:'ID',tab:1,type:'number',data:'int',width:'5%',readonly:false,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_lastmod:array{title:'Lastmod',tab:1,type:'datestamp',readonly:2,data:'int',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:false,batch:true},gsitemap_freq:array{title:'Freq.',type:'dropdown',data:'safestr',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:true,batch:true},gsitemap_priority:array{title:'Priority',type:'method',data:'safestr',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left',filter:true,batch:true},gsitemap_cat:array{title:'Category',tab:1,type:'text',data:'safestr',width:'auto',batch:true,filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_order:array{title:'Order',type:'number',data:'int',width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},gsitemap_img:array{title:'Image',type:'image',data:'safestr',width:'auto',help:'',readParms:'thumb=80x80',writeParms:array{},class:'left',thclass:'left'},gsitemap_active:array{title:'Visibility',type:'userclass',data:'int',width:'auto',filter:true,help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},options:array{title:'Options',type:null,data:null,width:'10%',thclass:'center last',class:'center last',forced:true,readParms:array{},writeParms:array{}}}
Open

            $this->fields['gsitemap_freq']['writeParms']['optArray'] = $this->freqList;
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Suspicious array access to false
Open

            <td>".$frm->text('gsitemap_name', $editArray['gsitemap_name'], '100', array('class' => 'tbox input-text span3'))."</td>
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

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

if(!getperms("P") || !e107::isInstalled('gsitemap'))
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Suspicious array access to false
Open

                    $text .= $editArray['gsitemap_order'] == $i ? "<option value='".$i."' selected='selected'>".$i."</option>" : "<option value='".$i."'>".$i."</option>";
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Argument 2 (className) is null but \e107::getAddonConfig() takes string defined at /code/e107_handlers/e107_class.php:2962
Open

            $addons = e107::getAddonConfig('e_gsitemap', null, 'import');
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.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($query,true);
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

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

e107::lan('gsitemap',true);
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Suspicious array access to false
Open

                    $sel = ($editArray['gsitemap_priority'] == number_format($i,1))? "selected='selected'" : "";
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

Call to undeclared method \e_db::db_getList
Open

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

Argument 2 (parseBB) is '' but \e_parse::toHTML() takes bool|false defined at /code/e107_handlers/e_parse_class.php:1532
Open

                <td>".$tp->toHTML($row2['gsitemap_name'],"","defs")."</td>
Severity: Minor
Found in e107_plugins/gsitemap/admin_config.php by phan

There are no issues that match your filters.

Category
Status