e107_handlers/plugin_class.php
File plugin_class.php
has 3572 lines of code (exceeds 2000 allowed). Consider refactoring. Open
Open
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
Avoid too many return
statements within this method. Open
Open
return array('type'=> 'warning', 'msg'=>"Using deprecated method. See e_status.php in the forum plugin for an example.");
Avoid too many return
statements within this method. Open
Open
return 0;
Avoid too many return
statements within this method. Open
Open
return array('type'=> 'warning', 'msg'=>"Using deprecated method. See e_latest.php in the forum plugin for an example.");
Avoid too many return
statements within this method. Open
Open
return array('type'=> 'warning', 'msg'=>"Using deprecated method. See e_status.php in the forum plugin for an example.");
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return 0;
Avoid too many return
statements within this method. Open
Open
return array('type'=> 'warning', 'msg'=>"Using deprecated method. See e_latest.php in the forum plugin for an example.");
Saw possibly unextractable annotation for a fragment of comment '* @param string e_xxxx addon':
after string,
did not see an element name (will guess based on comment order) Open
Open
* @param string e_xxxx addon
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'folder',
but expected the index to be of type int
Open
Open
if ($plugin_path == $plug_info['folder'])
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'lan',
but expected the index to be of type int
Open
Open
if (vartrue($plug_info['@attributes']['lan']) && $pluginDBList[$plugin_path]['plugin_name'] != $plug_info['@attributes']['lan'])
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'lan',
but expected the index to be of type int
Open
Open
$pluginDBList[$plugin_path]['plugin_name'] = $plug_info['@attributes']['lan'];
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'installRequired',
but expected the index to be of type int
Open
Open
$_installed = ($plug_info['@attributes']['installRequired'] == 'true' || $plug_info['@attributes']['installRequired'] == 1 ? 0 : 1);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
'plugin_version' => $tp->toDB($plug_info['@attributes']['version'], true),
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'name',
but expected the index to be of type int
Open
Open
if ($plug_info['@attributes']['name'])
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$pName = vartrue($plug_info['@attributes']['lan']) ? $plug_info['@attributes']['lan'] : $plug_info['@attributes']['name'] ;
- Exclude checks
Reference to undeclared property \e107->user_class
Open
Open
$e107->user_class = new user_class_admin; // We need the extra methods of the admin extension
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'lan',
but expected the index to be of type int
Open
Open
$pName = vartrue($plug_info['@attributes']['lan']) ? $plug_info['@attributes']['lan'] : $plug_info['@attributes']['name'] ;
- Exclude checks
Argument 1 (no_cache)
is ''
but \e107_user_extended::parse_extended_xml()
takes bool|false
defined at /code/e107_handlers/user_extended_class.php:1527
Open
Open
$preList = $this->module['ue']->parse_extended_xml(''); // passed value currently not used at all, could be file path in the near future
- Exclude checks
Call to deprecated function \e107_user_extended::user_extended_get_categories()
defined at /code/e107_handlers/user_extended_class.php:595
Open
Open
$cats = $this->module['ue']->user_extended_get_categories(false);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'category',
but expected the index to be of type int
Open
Open
$pluginDBList[$plugin_path]['plugin_category'] = (vartrue($plug_info['category'])) ? $plug_info['category'] : "misc";
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$pluginDBList[$plugin_path]['plugin_name'] = $plug_info['@attributes']['lan'];
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'version',
but expected the index to be of type int
Open
Open
'plugin_version' => $tp->toDB($plug_info['@attributes']['version'], true),
- Exclude checks
Variable $replace
was undeclared, but array fields are being added to it. Open
Open
$search[0] = "CREATE TABLE "; $replace[0] = "CREATE TABLE ".MPREFIX;
- Exclude checks
Invalid offset "link_desription"
of array type array{link_owner:mixed}|array{}
Open
Open
'link_description' => vartrue($options['link_desription']),
- Exclude checks
Invalid offset "link_sef"
of array type array{link_owner:mixed}|array{}
Open
Open
'link_sefurl' => vartrue($options['link_sef']),
- Exclude checks
Invalid offset "description"
of array type array{@attributes:array{compatibility:array|string|string[]}}|array{@attributes:array{version:array|null|string|string[]}}|array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
if(varset($ret['description']))
- Exclude checks
Invalid offset "adminLinks"
of array type array{@attributes:array{compatibility:array|string|string[]}}|array{@attributes:array{version:array|null|string|string[]}}|array{administration:array{icon:mixed}}|array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{description:array{@value:mixed}}|array{description:array{@value:null}}|array{description:mixed,category:'misc'|mixed|string,folder:string,files:array,lan:false|mixed,@attributes:array{compatibility:array|string|string[]}|array{version:array|null|string|string[]}}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
$ret['administration']['caption'] = varset($ret['adminLinks']['link'][0]['@attributes']['description']);
- Exclude checks
Invalid offset "adminLinks"
of array type array{@attributes:array{compatibility:array|string|string[]}}|array{@attributes:array{version:array|null|string|string[]}}|array{administration:array{caption:mixed}}|array{administration:array{icon:mixed}}|array{administration:array{iconSmall:mixed}}|array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{description:array{@value:mixed}}|array{description:array{@value:null}}|array{description:mixed,category:'misc'|mixed|string,folder:string,files:array,lan:false|mixed,@attributes:array{compatibility:array|string|string[]}|array{version:array|null|string|string[]}}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
$ret['administration']['configFile'] = varset($ret['adminLinks']['link'][0]['@attributes']['url']);
- Exclude checks
Variable $search
was undeclared, but array fields are being added to it. Open
Open
$search[0] = "CREATE TABLE "; $replace[0] = "CREATE TABLE ".MPREFIX;
- Exclude checks
Variable $plug_perm
was undeclared, but array fields are being added to it. Open
Open
$plug_perm['everyone'] = e_UC_PUBLIC;
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$pluginDBList[$plugin_path]['plugin_version'] = $plug_info['@attributes']['version'];
- Exclude checks
Invalid offset "link_category"
of array type array{link_owner:mixed}|array{}
Open
Open
'link_category' => vartrue($options['link_category'],'1'),
- Exclude checks
Invalid offset "@attributes"
of array type array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
$ret['@attributes']['version'] = $this->_fixVersion($ret['@attributes']['version']);
- Exclude checks
Invalid offset "compatibility"
of array type array{version:array|null|string|string[]}
Open
Open
$ret['@attributes']['compatibility'] = $this->_fixCompat($ret['@attributes']['compatibility']);
- Exclude checks
Invalid offset "adminLinks"
of array type array{@attributes:array{compatibility:array|string|string[]}}|array{@attributes:array{version:array|null|string|string[]}}|array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{description:array{@value:mixed}}|array{description:array{@value:null}}|array{description:mixed,category:'misc'|mixed|string,folder:string,files:array,lan:false|mixed,@attributes:array{compatibility:array|string|string[]}|array{version:array|null|string|string[]}}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
$ret['administration']['icon'] = varset($ret['adminLinks']['link'][0]['@attributes']['icon']);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
if ($plug_info['@attributes']['name'])
- Exclude checks
Variable $plug
was undeclared, but array fields are being added to it. Open
Open
$plug['plug_action'] = 'scan'; // Make sure plugin.php knows what we're up to
- Exclude checks
Invalid offset "link_function"
of array type array{link_owner:mixed}|array{}
Open
Open
'link_function' => vartrue($options['link_function']),
- Exclude checks
Invalid offset "description"
of array type array{@attributes:array{compatibility:array|string|string[]}}|array{@attributes:array{version:array|null|string|string[]}}|array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
$diz = $ret['description'];
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
if (vartrue($plug_info['@attributes']['lan']) && $pluginDBList[$plugin_path]['plugin_name'] != $plug_info['@attributes']['lan'])
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'category',
but expected the index to be of type int
Open
Open
if ($pluginDBList[$plugin_path]['plugin_category'] == '' || $pluginDBList[$plugin_path]['plugin_category'] != $plug_info['category'])
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'version',
but expected the index to be of type int
Open
Open
if (($pluginDBList[$plugin_path]['plugin_installflag'] == 0) && ($pluginDBList[$plugin_path]['plugin_version'] != $plug_info['@attributes']['version']))
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'version',
but expected the index to be of type int
Open
Open
$pluginDBList[$plugin_path]['plugin_version'] = $plug_info['@attributes']['version'];
- Exclude checks
When appending to a value of type string,
found an array access index of type 'folder',
but expected the index to be of type int
Open
Open
$ret['folder'] = $plugName; // remove the need for <folder> tag in plugin.xml.
- Exclude checks
Invalid offset "adminLinks"
of array type array{@attributes:array{compatibility:array|string|string[]}}|array{@attributes:array{version:array|null|string|string[]}}|array{administration:array{caption:mixed}}|array{administration:array{icon:mixed}}|array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{description:array{@value:mixed}}|array{description:array{@value:null}}|array{description:mixed,category:'misc'|mixed|string,folder:string,files:array,lan:false|mixed,@attributes:array{compatibility:array|string|string[]}|array{version:array|null|string|string[]}}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
$ret['administration']['iconSmall'] = varset($ret['adminLinks']['link'][0]['@attributes']['iconSmall']);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
if (($pluginDBList[$plugin_path]['plugin_installflag'] == 0) && ($pluginDBList[$plugin_path]['plugin_version'] != $plug_info['@attributes']['version']))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'category',
but expected the index to be of type int
Open
Open
'plugin_category' => $this->manage_category($plug_info['category'])
- Exclude checks
Invalid offset "link_icon"
of array type array{link_owner:mixed}|array{}
Open
Open
'link_button' => vartrue($options['link_icon']),
- Exclude checks
Invalid offset "description"
of array type array{@attributes:array{compatibility:array|string|string[]}}|array{@attributes:array{version:array|null|string|string[]}}|array{category:'misc'|mixed|string}|array{category:mixed,folder:string}|array{files:array}|array{folder:string}|array{lan:false|mixed}|string
Open
Open
if (is_array($ret['description']))
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'name',
but expected the index to be of type int
Open
Open
$pName = vartrue($plug_info['@attributes']['lan']) ? $plug_info['@attributes']['lan'] : $plug_info['@attributes']['name'] ;
- Exclude checks
Returning type false
but getId()
is declared to return int
Open
Open
return false;
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$_installed = ($plug_info['@attributes']['installRequired'] == 'true' || $plug_info['@attributes']['installRequired'] == 1 ? 0 : 1);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
if ($notify_prefs->isData('plugins/'.$eplug_folder))
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->XmlAdminLinks($function, $plug_vars['adminLinks']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['mainPrefs'])) //Core pref items <mainPrefs>
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['extendedFields']))
- Exclude checks
Argument 2 (pieces)
is string
but \implode()
takes string[]
when argument 1 is string
Open
Open
$txt .= 'Removing all plugin comments: ('.implode(', ', $plug_vars['commentID']).')<br />';
- Exclude checks
Call to undeclared method \e_db::db_Query_all
Open
Open
$status = $sql->db_Query_all($query) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
- Exclude checks
Call to undeclared method \e_db::getServerInfo
Open
Open
if(isset($dv['@attributes']['min_version']) && (version_compare($dv['@attributes']['min_version'], $db->getServerInfo(), '<=') === false)
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$shortcodeLegacyList = $fl->get_files(e_PLUGIN.$plugin_path, '\.sc$', "standard", 1);
- Exclude checks
Assigning array{files:array,menuName:mixed,readme:mixed,category:'misc'|mixed|string,folder:mixed|string,@attributes:array{compatibility:mixed}|array{date:mixed}|array{installRequired:''|'true'}|array{lang:mixed}|array{name:mixed}|array{version:mixed}|array{xhtmlcompliant:''|'true'},author:array{@attributes:array{email:mixed}}|array{@attributes:array{name:mixed}}|array{@attributes:array{url:mixed}},description:array{@attributes:array{lang:mixed}}|array{@value:mixed},mainPrefs:array{pref:array{0:array{@attributes:array{name:}}}}|array{pref:array{0:array{@value:mixed|null}}},administration:array{caption:mixed}|array{configFile:mixed}|array{icon:string|string[]}|array{iconSmall:string|string[]},adminLinks:array{link:array{0:array{@attributes:array{description:'Configure'}}}}|array{link:array{0:array{@attributes:array{icon:string|string[]}}}}|array{link:array{0:array{@attributes:array{iconSmall:string|string[]}}}}|array{link:array{0:array{@attributes:array{primary:'true'}}}}|array{link:array{0:array{@attributes:array{url:mixed}}}},siteLinks:array{link:array{0:array{@attributes:array{perm:mixed}}}}|array{link:array{0:array{@attributes:array{url:string}}}}|array{link:array{0:array{@value:mixed}}},userClasses:array{class:array{0:array{@attributes:array{description:}}}}|array{class:array{0:array{@attributes:array{name:}}}}}
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars = $ret;
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'administration',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['icon'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['icon']);
- Exclude checks
Call to undeclared method \e_db::db_Query_all
Open
Open
if (false === $sql->db_Query_all($tab))
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['adminLinks']))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'mainPrefs',
but expected the index to be of type int
Open
Open
$this->XmlPrefs('core', $function, $plug_vars['mainPrefs']);
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['folder'] = $plugName; // remove the need for <folder> tag in plugin.xml.
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'lan',
but expected the index to be of type int
Open
Open
if (isset($this->plug_vars['description']['@attributes']['lan']) && defined($this->plug_vars['description']['@attributes']['lan']))
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['description']['@value'] = constant($this->plug_vars['description']['@attributes']['lan']);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'adminLinks',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['icon'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['icon']);
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'description',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['caption'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['description']);
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'link',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['caption'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['description']);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
require_once(e_PLUGIN.$eplug_folder.'/search/search_comments.php');
- Exclude checks
Argument 1 (tags)
is string
but \e107plugin::XmlDependencies()
takes array
defined at /code/e107_handlers/plugin_class.php:3585
Open
Open
$canContinue = $this->XmlDependencies($plug_vars['dependencies']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['bbcodes']))
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$sql->update('plugin', "plugin_installflag = 1, plugin_addons = '{$eplug_addons}', plugin_version = '{$plug_vars['@attributes']['version']}', plugin_category ='".$this->manage_category($plug_vars['category'])."' WHERE plugin_id = ".$id);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if(!file_exists(e_PLUGIN. $plug_vars['folder']."/e_cron.php"))
- Exclude checks
Call to undeclared method \e_db::db_Query
Open
Open
$status = $sql->db_Query($query) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
echo $plugin_path."/".$addon.".php - ".$passfail."<br />";
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$sqlList = $fl->get_files(e_PLUGIN.$plugin_path, '_sql\.php$', "standard", 1);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'adminLinks',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['caption'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['description']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['mediaCategories']))
- Exclude checks
Call to deprecated function \e107plugin::getPluginRecord()
defined at /code/e107_handlers/plugin_class.php:1965
Open
Open
$plug = e107plugin::getPluginRecord($id);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'siteLinks',
but expected the index to be of type int
Open
Open
if (varset($plug_vars['siteLinks']))
- Exclude checks
Call to deprecated function \e107plugin::getPluginRecord()
defined at /code/e107_handlers/plugin_class.php:1965
Open
Open
$plug = e107plugin::getPluginRecord($dir);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$bbcodeList = $fl->get_files(e_PLUGIN.$plugin_path, '\.bb$', "standard", 1);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
if (is_readable(e_PLUGIN.$plugin_path."/".$sc['fname']))
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['administration']['caption'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['description']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->XmlPrefs($plug['plugin_path'], $function, $plug_vars['pluginPrefs']);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$shortcodeList = $fl->get_files(e_PLUGIN.$plugin_path.'/shortcodes/single', '\.php$', "standard", 1);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
if (is_readable(e_PLUGIN.$plugin_path."/shortcodes/single/".$sc['fname']))
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
if (is_readable(e_PLUGIN.$plugin_path."/".$bb['fname']))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'description',
but expected the index to be of type int
Open
Open
if(varset($this->plug_vars['description']))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'description',
but expected the index to be of type int
Open
Open
if (isset($this->plug_vars['description']['@attributes']['lan']) && defined($this->plug_vars['description']['@attributes']['lan']))
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'description',
but expected the index to be of type int
Open
Open
$this->plug_vars['description']['@value'] = constant($this->plug_vars['description']['@attributes']['lan']);
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'lan',
but expected the index to be of type int
Open
Open
$this->plug_vars['description']['@value'] = constant($this->plug_vars['description']['@attributes']['lan']);
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'icon',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['icon'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['icon']);
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'administration',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['caption'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['description']);
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'administration',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['iconSmall'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['iconSmall']);
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'administration',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['configFile'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['url']);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'adminLinks',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['configFile'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['url']);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$default = file_exists(e_PLUGIN.$eplug_folder.'/e_search.php') ? TRUE : FALSE;
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$e_notify = file_exists(e_PLUGIN.$eplug_folder.'/e_notify.php') ? TRUE : FALSE;
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->XmlPrefs('core', $function, $plug_vars['mainPrefs']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->XmlExtendedFields($function, $plug_vars['extendedFields']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['languageFiles']))
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->XmlLanguageFiles($function, $plug_vars['languageFiles']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$xmlInstallStatus = $this->XmlInstallXml($function, $plug_vars['folder']);
- Exclude checks
Default value for object
$when
can't be string
Open
Open
function execute_function($path = null, $what = '', $when = '', $callbackData = null)
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'userClasses',
but expected the index to be of type int
Open
Open
if (varset($plug_vars['userClasses']))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'files',
but expected the index to be of type int
Open
Open
$this->addonMenu($plug_vars['folder'], $function, $plug_vars['files']);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$sql->update('plugin', "plugin_installflag=0, plugin_version='{$eplug_version}' WHERE plugin_path='{$eplug_folder}' ");
- Exclude checks
Argument 3 (subject)
is null
but \str_replace()
takes array|string
Open
Open
$ret['administration']['icon'] = str_replace($plugName."/","",$eplug_icon);
- Exclude checks
Assigning array<string>|array<string></string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['category'] = (isset($this->plug_vars['category'])) ? $this->manage_category($this->plug_vars['category']) : "misc";
- Exclude checks
Call to deprecated function \e107plugin::getPluginRecord()
defined at /code/e107_handlers/plugin_class.php:1965
Open
Open
$plug = e107plugin::getPluginRecord($id); // Get plugin info from DB
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['pluginPrefs'])) //Plugin pref items <pluginPrefs>
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'commentID',
but expected the index to be of type int
Open
Open
$txt .= 'Removing all plugin comments: ('.implode(', ', $plug_vars['commentID']).')<br />';
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$notify_prefs->removePref('plugins/'.$eplug_folder);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->manage_notify($function, $plug_vars['folder']);
- Exclude checks
Argument 3 (fmask)
is false
but \e_media::import()
takes string
defined at /code/e107_handlers/media_class.php:81
Open
Open
e107::getMedia()->import($data['category'],e_PLUGIN.$folder, false,'min-size=20000');
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
e107::getMessage()->addDebug($plug_vars['folder']." crons removed successfully."); // No LAN necessary
- Exclude checks
string
passed to foreach instead of array Open
Open
foreach($files as $file)
- Exclude checks
Argument 3 (prefArray)
is string
but \e107plugin::XmlPrefs()
takes array
defined at /code/e107_handlers/plugin_class.php:4238
Open
Open
$this->XmlPrefs('core', $function, $plug_vars['mainPrefs']);
- Exclude checks
Argument 2 (array)
is string
but \e107plugin::XmlUserClasses()
takes array
defined at /code/e107_handlers/plugin_class.php:4090
Open
Open
$this->XmlUserClasses($function, $plug_vars['userClasses']);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
echo $plugin_path." = ".implode(",", $p_addons)."<br />";
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$bbcodeClassList= $fl->get_files(e_PLUGIN.$plugin_path, '^bb_(.*)\.php$', "standard", 1);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'administration',
but expected the index to be of type int
Open
Open
$icon_src = e_PLUGIN.$plugName."/".$plug_vars['administration'][$sz];
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'icon'|'iconSmall',
but expected the index to be of type int
Open
Open
$plugin_icon = $plug_vars['administration'][$sz] ? "<img src='{$icon_src}' alt='' class='icon S".intval($size)."' />" : $default;
- Exclude checks
Argument 3 (subject)
is null
but \str_replace()
takes array|string
Open
Open
$ret['administration']['iconSmall'] = str_replace($plugName."/","",$eplug_icon_small);
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'category',
but expected the index to be of type int
Open
Open
$this->plug_vars['category'] = (isset($this->plug_vars['category'])) ? $this->manage_category($this->plug_vars['category']) : "misc";
- Exclude checks
Assigning array<string>|array<string></string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['folder'] = $plugName; // remove the need for <folder> tag in plugin.xml.
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'category',
but expected the index to be of type int
Open
Open
$this->plug_vars['category'] = (isset($this->plug_vars['category'])) ? $this->manage_category($this->plug_vars['category']) : "misc";
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'iconSmall',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['iconSmall'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['iconSmall']);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'description',
but expected the index to be of type int
Open
Open
if (is_array($this->plug_vars['description']))
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'link',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['iconSmall'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['iconSmall']);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'description',
but expected the index to be of type int
Open
Open
$diz = $this->plug_vars['description'];
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['icon'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['icon']);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$notify_prefs->setPref('plugins/'.$eplug_folder, 1); //$notify_prefs['plugins'][$eplug_folder] = TRUE;
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if (varset($plug_vars['userClasses']))
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->addonMenu($this->plugFolder, $function, $plug_vars['files']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$p_installed[$plug['plugin_path']] = $plug_vars['@attributes']['version'];
- Exclude checks
Returning type bool
but XmlSiteLinks()
is declared to return null
Open
Open
return $status === E_MESSAGE_SUCCESS;
- Exclude checks
Argument 2 (plug_vars)
is false|string
but \e107plugin::XmlSiteLinks()
takes array
defined at /code/e107_handlers/plugin_class.php:3825
Open
Open
$this->XmlSiteLinks($function, $plug_vars);
- Exclude checks
Reference to undeclared property \e107plugin->action
Open
Open
$this->action = 'installed'; // Render plugin list.
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'folder',
but expected the index to be of type int
Open
Open
$this->plug_vars['folder'] = $plugName; // remove the need for <folder> tag in plugin.xml.
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['caption'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['description']);
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['iconSmall'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['iconSmall']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if(e107::getDb()->delete('cron', 'cron_function LIKE "'. $plug_vars['folder'] . '::%"'))
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if(!empty($tag['bbcodes']['@attributes']['imgResize']))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'userClasses',
but expected the index to be of type int
Open
Open
$this->XmlUserClasses($function, $plug_vars['userClasses']);
- Exclude checks
Call to deprecated function \e107plugin::getPluginRecord()
defined at /code/e107_handlers/plugin_class.php:1965
Open
Open
$plug = e107plugin::getPluginRecord($id);
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['folder'] = $plugName; // remove the need for <folder> tag in plugin.xml.
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$this->plug_vars['description']['@value'] = constant($this->plug_vars['description']['@attributes']['lan']);
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'description',
but expected the index to be of type int
Open
Open
$this->plug_vars['description']['@value'] = $diz;
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'adminLinks',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['iconSmall'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['iconSmall']);
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['administration']['iconSmall'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['iconSmall']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->XmlUserClasses($function, $plug_vars['userClasses']);
- Exclude checks
Returning type null
but install_plugin_xml()
is declared to return bool
Open
Open
return null;
- Exclude checks
Variable $data
was undeclared, but array fields are being added to it. Open
Open
$data['owner'] = $folder;
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
if(!empty($tag['bbcodes']['@attributes']['imgResize']))
- Exclude checks
Call to deprecated function \e107plugin::parse_plugin_xml()
defined at /code/e107_handlers/plugin_class.php:5402
Open
Open
$ret = $this->parse_plugin_xml($plugName);
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['description']['@value'] = $diz;
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'url',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['configFile'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['url']);
- Exclude checks
Indirect variable ${(expr)} has invalid inner expression type array<int>|array<int>|array<int>|array{},</int></int></int>
expected string/integer Open
Open
return (!$error ? true : (!empty($$error_data) ? implode('<br />', $error_data) : false));
- Exclude checks
Variable $prefvals
was undeclared, but array fields are being added to it. Open
Open
$prefvals[] = $varArray;
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
require_once(e_PLUGIN.$eplug_folder.'/e_notify.php');
- Exclude checks
Call to deprecated function \e107plugin::getPluginRecord()
defined at /code/e107_handlers/plugin_class.php:1965
Open
Open
$plug = e107plugin::getPluginRecord($id); // Get plugin info from DB
- Exclude checks
Call to deprecated function \e107plugin::parse_plugin_xml()
defined at /code/e107_handlers/plugin_class.php:5402
Open
Open
if ($canContinue && $this->parse_plugin_xml($plug['plugin_path']))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'dependencies',
but expected the index to be of type int
Open
Open
$canContinue = $this->XmlDependencies($plug_vars['dependencies']);
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'dependencies',
but expected the index to be of type int
Open
Open
foreach($plugInfo['dependencies'] as $dt => $da)
- Exclude checks
Returning type array<int>|array{}</int>
but XmlExtendedFields()
is declared to return null
Open
Open
return $ret;
- Exclude checks
Call to deprecated function \e107plugin::getPluginRecord()
defined at /code/e107_handlers/plugin_class.php:1965
Open
Open
$plug = e107plugin::getPluginRecord($id);
- Exclude checks
Argument 3 (subject)
is null
but \str_replace()
takes array|string
Open
Open
$ret['adminLinks']['link'][0]['@attributes']['icon'] = str_replace($plugName."/","",$eplug_icon);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'description',
but expected the index to be of type int
Open
Open
$this->plug_vars['description']['@value'] = constant($this->plug_vars['description']['@attributes']['lan']);
- Exclude checks
Call to undeclared method \e_db::db_Query_all
Open
Open
if (!$sql->db_Query_all($qry))
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$comments = file_exists(e_PLUGIN.$eplug_folder.'/search/search_comments.php') ? TRUE : FALSE;
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$uninstall_notify = $notify_prefs->isData('plugins/'.$eplug_folder); //isset($notify_prefs['plugins'][$eplug_folder]) ? TRUE : FALSE;
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
require_once(e_PLUGIN.$eplug_folder.'/e_notify.php');
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$sql->update('plugin', "plugin_installflag = 0, plugin_addons = '{$eplug_addons}', plugin_version = '{$plug_vars['@attributes']['version']}', plugin_category ='".$this->manage_category($plug_vars['category'])."' WHERE plugin_id = ".$id);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->log($plug_vars['folder']." crons removed successfully."); // no LANs.
- Exclude checks
Argument 4 (options)
is 'min-size=20000'
but \e_media::import()
takes array
defined at /code/e107_handlers/media_class.php:81
Open
Open
e107::getMedia()->import($data['category'],e_PLUGIN.$folder, false,'min-size=20000');
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['files'] = preg_grep('/^([^.])/', scandir(e_PLUGIN.$plugName,SCANDIR_SORT_ASCENDING));
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
if (isset($this->plug_vars['description']['@attributes']['lan']) && defined($this->plug_vars['description']['@attributes']['lan']))
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'link',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['icon'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['icon']);
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['administration']['icon'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['icon']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
foreach($tag['mediaCategories']['category'] as $v)
- Exclude checks
Call to undeclared method \e_db::db_Query
Open
Open
if (false === $sql->db_Query($tab))
- Exclude checks
string
passed to foreach instead of array Open
Open
foreach($plugInfo['dependencies'] as $dt => $da)
- Exclude checks
Default value for object
$tag
can't be string
Open
Open
function XmlLanguageFiles($function, $tag='', $when = '')
- Exclude checks
Call to undeclared function _install
in callable Open
Open
$text .= call_user_func($func);
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'mainPrefs',
but expected the index to be of type int
Open
Open
if (varset($plug_vars['mainPrefs'])) //Core pref items <mainPrefs>
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
if (is_readable(e_PLUGIN.$plugin_path."/".$addonPHP))
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'administration',
but expected the index to be of type int
Open
Open
$plugin_icon = $plug_vars['administration'][$sz] ? "<img src='{$icon_src}' alt='' class='icon S".intval($size)."' />" : $default;
- Exclude checks
Argument 3 (subject)
is null
but \str_replace()
takes array|string
Open
Open
$ret['adminLinks']['link'][0]['@attributes']['iconSmall'] = str_replace($plugName."/","",$eplug_icon_small);
- Exclude checks
Assigning array{files:array,menuName:mixed,readme:mixed,category:'misc'|mixed|string,folder:mixed,@attributes:array{compatibility:mixed}|array{date:mixed}|array{installRequired:''|'true'}|array{lang:mixed}|array{name:mixed}|array{version:mixed}|array{xhtmlcompliant:''|'true'},author:array{@attributes:array{email:mixed}}|array{@attributes:array{name:mixed}}|array{@attributes:array{url:mixed}},description:array{@attributes:array{lang:mixed}}|array{@value:mixed},mainPrefs:array{pref:array{0:array{@attributes:array{name:}}}}|array{pref:array{0:array{@value:mixed|null}}},administration:array{caption:mixed}|array{configFile:mixed}|array{icon:string|string[]}|array{iconSmall:string|string[]},adminLinks:array{link:array{0:array{@attributes:array{description:'Configure'}}}}|array{link:array{0:array{@attributes:array{icon:string|string[]}}}}|array{link:array{0:array{@attributes:array{iconSmall:string|string[]}}}}|array{link:array{0:array{@attributes:array{primary:'true'}}}}|array{link:array{0:array{@attributes:array{url:mixed}}}},siteLinks:array{link:array{0:array{@attributes:array{perm:mixed}}}}|array{link:array{0:array{@attributes:array{url:string}}}}|array{link:array{0:array{@value:mixed}}},userClasses:array{class:array{0:array{@attributes:array{description:}}}}|array{class:array{0:array{@attributes:array{name:}}}}}
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars = $ret;
- Exclude checks
When fetching an array index from a value of type false|null|string,
found an array index of type 'languageFiles',
but expected the index to be of type int
Open
Open
$this->XmlLanguageFiles($function, varset($plug_vars['languageFiles']), 'pre'); // First of all, see if there's a language file specific to install
- Exclude checks
Argument 2 (plug_vars)
is string
but \e107plugin::XmlSiteLinks()
takes array
defined at /code/e107_handlers/plugin_class.php:3825
Open
Open
$this->XmlSiteLinks($function, $plug_vars);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$this->manage_search($function, $plug_vars['folder']);
- Exclude checks
Suspicious array access to ?false|?string
Open
Open
$folder = $tag['folder'];
- Exclude checks
Default value for object
$what
can't be string
Open
Open
function execute_function($path = null, $what = '', $when = '', $callbackData = null)
- Exclude checks
When fetching an array index from a value of type false|string,
found an array index of type 'folder',
but expected the index to be of type int
Open
Open
$this->addonMenu($plug_vars['folder'], $function, $plug_vars['files']);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$file_text = file_get_contents(e_PLUGIN.$plugin_path."/".$addonPHP);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
if (is_readable(e_PLUGIN.$plugin_path."/".$esql['fname']))
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'icon'|'iconSmall',
but expected the index to be of type int
Open
Open
$icon_src = e_PLUGIN.$plugName."/".$plug_vars['administration'][$sz];
- Exclude checks
When appending to a value of type false|string,
found an array access index of type 'files',
but expected the index to be of type int
Open
Open
$this->plug_vars['files'] = preg_grep('/^([^.])/', scandir(e_PLUGIN.$plugName,SCANDIR_SORT_ASCENDING));
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['configFile'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['url']);
- Exclude checks
Assigning array<string></string>
to property but \e107plugin->plug_vars
is false|string
Open
Open
$this->plug_vars['administration']['configFile'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['url']);
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'link',
but expected the index to be of type int
Open
Open
$this->plug_vars['administration']['configFile'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['url']);
- Exclude checks