e107inc/e107

View on GitHub
e107_handlers/theme_handler.php

Summary

Maintainability
A
40 mins
Test Coverage
F
56%

Consider simplifying this complex logical expression.
Open

                    if($skinText = self::renderSkin($theme, $mode, $pref))
                    {
                        $text .= $skinText;
                    }
                    elseif(!empty($theme['multipleStylesheets']) && $mode && !empty($theme['css']) && self::RENDER_SITEPREFS === $mode)
Severity: Major
Found in e107_handlers/theme_handler.php - About 40 mins to fix

    Invalid offset "layouts" of array type array{@attributes:array{default:0|1}}|array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{category:string}|array{compatibility:''|array|bool|string}|array{csscompliant:mixed}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{html:bool}|array{info:mixed}|array{name:mixed}|array{preferences:array}|array{preview:mixed,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{preview:mixed}|array{preview?:null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{releaseUrl:mixed}|array{themePrefs:mixed,preview:mixed|null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed,thumbnail:''|mixed,html:bool}|array{thumbnail:''|mixed}|array{version:mixed}|array{website:mixed}|array{xhtmlcompliant:mixed}|false|string
    Open

            foreach($vars['layouts']['layout'] as $k=>$val)
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

            $themeArray['name'] = varset($match[3]);
    Severity: Info
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "author" of array type array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{compatibility:''|array|bool|string}|array{date:mixed}|array{email:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|array{website:mixed}|false|string
    Open

            $vars['author']         = varset($vars['author']['@attributes']['name']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 4 (options) is 'min-size=20000' but \e_media::import() takes array defined at /code/e107_handlers/media_class.php:81
    Open

                $med->import('_common_image', e_THEME.$name, '', 'min-size=20000');
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    string passed to foreach instead of array
    Open

                foreach($xmlArray['prefs']['core'] as $key=>$val)
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    When fetching an array index from a value of type array<string>,</string> found an array index of type ?string, but expected the index to be of the non-nullable type string
    Open

            return isset($this->_data[$this->_current][$var]) ? $this->_data[$this->_current][$var] : false;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "author" of array type array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{compatibility:''|array|bool|string}|array{date:mixed}|array{email:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|false|string
    Open

            $vars['website']         = varset($vars['author']['@attributes']['url']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "description" of array type array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{compatibility:''|array|bool|string}|array{date:mixed}|array{email:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|array{website:mixed}|false|string
    Open

            $vars['info']             = !empty($vars['description']['@value']) ? $vars['description']['@value'] : varset($vars['description']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Returning type false but themeUpload() is declared to return string
    Open

                return FALSE;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Returning type false but getScope() is declared to return array
    Open

                return false;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Suspicious array access to ?mixed
    Open

                    if($name === 'bootstrap' && ((int) $var['version'] > 3)) // quick fix.
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

            $lays['legacyDefault']['@attributes'] = array('title'=>'Default',
    Severity: Info
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "author" of array type array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{compatibility:''|array|bool|string}|array{date:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|false|string
    Open

            $vars['email']             = varset($vars['author']['@attributes']['email']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 1 (ver1) is float but \version_compare() takes string
    Open

            $compat            = (version_compare(1.9,$theme['compatibility'],'<')) ? "<span class='label label-".$compatLabelType."'>".$theme['compatibility']."</span><span class='text-".$compatLabelType."'> ".$compatLabel."</span>": vartrue($theme['compatibility'],'1.0');
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Assigning false to property but \themeHandler->themeConfigObj is \theme_config|object
    Open

                    $this->themeConfigObj = false;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "caption" of array type array{title:'Bootswatch Styles:',type:'dropdown',writeParms:array{optArray:array{cerulean:'Cerulean',cosmo:'Cosmo',cyborg:'Cyborg',darkly:'Darkly',flatly:'Flatly',journal:'Journal',lumen:'Lumen',paper:'Paper',readable:'Readable',sandstone:'Sandstone',simplex:'Simplex',slate:'Slate',spacelab:'Spacelab',superhero:'Superhero',united:'United',yeti:'Yeti'},post:' \x3ca class=\'btn btn-default btn-secondary e-modal\' data-modal-caption="Use the \'Themes\' menu to view the selection." href=\'http://bootswatch.com/default/\'\x3ePreview\x3c/a\x3e',default:'Default'}}|array{title:'Branding:',type:'dropdown',writeParms:array{optArray:array{sitename:'Site Name',logo:'Logo',sitenamelogo:'Logo & Site Name'}}}|array{title:'Navbar Alignment:',type:'dropdown',writeParms:array{optArray:array{left:'left',right:'right'}}}|array{title:'Signup/Login Placement:',type:'dropdown',writeParms:array{optArray:array{top:'top',bottom:'bottom'}}}
    Open

                        $text .= "<tr><td><b>".$val['caption']."</b>:</td><td colspan='2'>".$val['html']."<div class='field-help'>".$val['help']."</div></td></tr>";
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Call to undeclared method process in callable. Possible object type(s) for that method are \theme_config|object
    Open

                return call_user_func(array(&$this->themeConfigObj, 'process')); //pre v2.1.4
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

                        $ar[$val['menu_location']][] = $val['menu_name'];
    Severity: Info
    Found in e107_handlers/theme_handler.php by phan

    Reference to undeclared constant \ADMIN_INFO_ICON
    Open

                                            <th>".TPVLAN_56."&nbsp;<a href='#' class='e-tip' title=\"".TPVLAN_96."\">".ADMIN_INFO_ICON."</a></th>
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

            foreach($xmlArray['database']['dbTable'] as $key=>$val)
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 3 (omit) is array{0:'e_.*'} but \e_file::get_files() takes string defined at /code/e107_handlers/file_class.php:245
    Open

            $handle2 = e107::getFile()->get_files(e_THEME.$file."/", "\.php|\.css|\.xml|preview\.jpg|preview\.png", $reject, 1);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "@attributes" of array type array{date:mixed}|array{name:mixed}|array{version:mixed}|false|string
    Open

            $vars['compatibility']     = !empty($vars['@attributes']['compatibility']) ? $tp->filter($vars['@attributes']['compatibility'], 'version') : '';
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Suspicious type null of a variable or expression used to build a string. (Expected type to be able to cast to a string)
    Open

                        $text .= "<tr><td><b>".$val['caption']."</b>:</td><td colspan='2'>".$val['html']."<div class='field-help'>".$val['help']."</div></td></tr>";
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

            $layout      = $pref['sitetheme_layouts'] = is_array($this->themeArray[$name]['layouts']) ? $this->themeArray[$name]['layouts'] : array();
    Severity: Info
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "compliance" of array type array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{category:string}|array{compatibility:''|array|bool|string}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{info:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|array{website:mixed}|array{xhtmlcompliant:mixed}|false|string
    Open

            $vars['csscompliant']     = varset($vars['compliance']['@attributes']['css']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "libraries" of array type array{@attributes:array{default:0|1}}|array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{category:string}|array{compatibility:''|array|bool|string}|array{csscompliant:mixed}|array{custompages:array|array<int>[]|array{}}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{html:bool}|array{info:mixed}|array{layouts:array|array{}}|array{legacy:false}|array{library:array{}}|array{name:mixed}|array{path:string}|array{preferences:array}|array{preview:mixed,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{preview:mixed}|array{preview?:null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{releaseUrl:mixed}|array{themePrefs:mixed,preview:mixed|null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed,thumbnail:''|mixed,html:bool}|array{thumbnail:''|mixed}|array{version:mixed}|array{website:mixed}|array{xhtmlcompliant:mixed}|false|string</int>
    Open

            if(!empty($vars['libraries']['library']))
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Saw possibly unextractable annotation for a fragment of comment '* @param string [optional] $categoryfromXML': after string, did not see an element name (will guess based on comment order)
    Open

        function themeUpload()
    Severity: Info
    Found in e107_handlers/theme_handler.php by phan

    Reference to undeclared constant \ADMIN_TRUE_ICON
    Open

                    $itext .= !empty($val['menuPresets']) ? ADMIN_TRUE_ICON : "&nbsp;";
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 3 (variant) is null but \e107::library() takes string defined at /code/e107_handlers/e107_class.php:2356
    Open

                    $ret[] = e107::library('files', $name, null, $files);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "help" of array type array{title:'Bootswatch Styles:',type:'dropdown',writeParms:array{optArray:array{cerulean:'Cerulean',cosmo:'Cosmo',cyborg:'Cyborg',darkly:'Darkly',flatly:'Flatly',journal:'Journal',lumen:'Lumen',paper:'Paper',readable:'Readable',sandstone:'Sandstone',simplex:'Simplex',slate:'Slate',spacelab:'Spacelab',superhero:'Superhero',united:'United',yeti:'Yeti'},post:' \x3ca class=\'btn btn-default btn-secondary e-modal\' data-modal-caption="Use the \'Themes\' menu to view the selection." href=\'http://bootswatch.com/default/\'\x3ePreview\x3c/a\x3e',default:'Default'}}|array{title:'Branding:',type:'dropdown',writeParms:array{optArray:array{sitename:'Site Name',logo:'Logo',sitenamelogo:'Logo & Site Name'}}}|array{title:'Navbar Alignment:',type:'dropdown',writeParms:array{optArray:array{left:'left',right:'right'}}}|array{title:'Signup/Login Placement:',type:'dropdown',writeParms:array{optArray:array{top:'top',bottom:'bottom'}}}
    Open

                        $text .= "<tr><td><b>".$val['caption']."</b>:</td><td colspan='2'>".$val['html']."<div class='field-help'>".$val['help']."</div></td></tr>";
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 1 (mode) is false but \e_theme::getList() takes null|string defined at /code/e107_handlers/theme_handler.php:709
    Open

            return e107::getTheme()->getList($mode);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 3 (type) is null but \e_form::userclass() takes string defined at /code/e107_handlers/form_handler.php:3394
    Open

                                        $itext .= e107::getForm()->userclass('layoutUserclass['.$key.']',null, null, array('options'=>'public,member,admin,classes,no-excludes','size'=>'xxlarge'));
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 2 (curval) is null but \e_form::userclass() takes int defined at /code/e107_handlers/form_handler.php:3394
    Open

                                        $itext .= e107::getForm()->userclass('layoutUserclass['.$key.']',null, null, array('options'=>'public,member,admin,classes,no-excludes','size'=>'xxlarge'));
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Reference to undeclared constant \ADMIN_TRUE_ICON
    Open

                    $text .= $plug." ".ADMIN_TRUE_ICON;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

            foreach($xmlArray['database']['dbTable'] as $key=>$val)
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Suspicious array access to ?mixed
    Open

                    elseif($name === 'fontawesome' && ((int) $var['version'] > 4)) // quick fix.
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Suspicious array access to ?mixed
    Open

                        $name .= (string) $var['version'];
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Argument 3 (variant) is null but \e107::library() takes string defined at /code/e107_handlers/e107_class.php:2356
    Open

                e107::library('load', $name, null, $files);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "@attributes" of array type array{name:mixed}|array{version:mixed}|false|string
    Open

            $vars['date']             = varset($vars['@attributes']['date']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "glyphicons" of array type array{@attributes:array{default:0|1}}|array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{category:string}|array{compatibility:''|array|bool|string}|array{css:array<int>}|array{css:array{}}|array{csscompliant:mixed}|array{custompages:array|array<int>[]|array{}}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{glyphs:array{}}|array{html:bool}|array{info:mixed}|array{layouts:array|array{}}|array{legacy:false}|array{library:array[]}|array{library:array{}}|array{library:}|array{name:mixed}|array{path:string}|array{preferences:array}|array{preview:mixed,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{preview:mixed|null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed,thumbnail:''|mixed,html:bool,themePrefs:mixed,preferences:array,layouts:array|array{},path:string,custompages:array|array<int>[]|array{},legacy:false,library:array[]|array{},css:array{}}|array{preview:mixed|null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed,thumbnail:''|mixed,html:bool,themePrefs:mixed,preferences:array,layouts:array|array{},path:string,custompages:array|array<int>[]|array{},legacy:false,library:array{}}|array{preview:mixed}|array{preview?:null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{releaseUrl:mixed}|array{themePrefs:mixed,preview:mixed|null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed,thumbnail:''|mixed,html:bool}|array{thumbnail:''|mixed}|array{version:mixed}|array{website:mixed}|array{xhtmlcompliant:mixed}|false|string</int></int></int></int>
    Open

            if(!empty($vars['glyphicons']['glyph']))
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Returning type void but themeUpload() is declared to return string
    Open

                return;     
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    string passed to foreach instead of array
    Open

            foreach($xmlArray['database']['dbTable'] as $key=>$val)
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

                foreach($xmlArray['prefs']['core'] as $key=>$val)
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Saw an @param annotation for value, but it was not found in the param list of function renderSkin(array $theme, string $mode, $pref) : array
    Open

         * @param mixed $value
    Severity: Info
    Found in e107_handlers/theme_handler.php by phan

    Returning type string but renderSkin() is declared to return array
    Open

            return $text;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    When appending to a value of type false|string, found an array access index of type 'name', but expected the index to be of type int
    Open

            $vars['name']             = varset($vars['@attributes']['name']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    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

            $vars['name']             = varset($vars['@attributes']['name']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "screenshots" of array type array{@attributes:array{default:0|1}}|array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{category:string}|array{compatibility:''|array|bool|string}|array{csscompliant:mixed}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{info:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|array{website:mixed}|array{xhtmlcompliant:mixed}|false|string
    Open

            $vars['preview']         = varset($vars['screenshots']['image']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Suspicious type array|bool of a variable or expression used to build a string. (Expected type to be able to cast to a string)
    Open

                    $ret['css'][] = '{e_THEME}'.$this->get('path').'/'.$file;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Returning type int but get() is declared to return array|bool
    Open

            return isset($this->_data[$this->_current][$var]) ? $this->_data[$this->_current][$var] : false;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "help" of array type array{multilan:mixed,title:'Bootswatch Styles:'|'Branding:'|'Navbar Alignment:'|'Signup/Login Placement:',type:'dropdown',writeParms:array{optArray:array{cerulean:'Cerulean',cosmo:'Cosmo',cyborg:'Cyborg',darkly:'Darkly',flatly:'Flatly',journal:'Journal',lumen:'Lumen',paper:'Paper',readable:'Readable',sandstone:'Sandstone',simplex:'Simplex',slate:'Slate',spacelab:'Spacelab',superhero:'Superhero',united:'United',yeti:'Yeti'},post:' \x3ca class=\'btn btn-default btn-secondary e-modal\' data-modal-caption="Use the \'Themes\' menu to view the selection." href=\'http://bootswatch.com/default/\'\x3ePreview\x3c/a\x3e',default:'Default'}|array{optArray:array{left:'left',right:'right'}}|array{optArray:array{sitename:'Site Name',logo:'Logo',sitenamelogo:'Logo & Site Name'}}|array{optArray:array{top:'top',bottom:'bottom'}}}|array{title:'Bootswatch Styles:',type:'dropdown',writeParms:array{optArray:array{cerulean:'Cerulean',cosmo:'Cosmo',cyborg:'Cyborg',darkly:'Darkly',flatly:'Flatly',journal:'Journal',lumen:'Lumen',paper:'Paper',readable:'Readable',sandstone:'Sandstone',simplex:'Simplex',slate:'Slate',spacelab:'Spacelab',superhero:'Superhero',united:'United',yeti:'Yeti'},post:' \x3ca class=\'btn btn-default btn-secondary e-modal\' data-modal-caption="Use the \'Themes\' menu to view the selection." href=\'http://bootswatch.com/default/\'\x3ePreview\x3c/a\x3e',default:'Default'}}|array{title:'Branding:',type:'dropdown',writeParms:array{optArray:array{sitename:'Site Name',logo:'Logo',sitenamelogo:'Logo & Site Name'}}}|array{title:'Navbar Alignment:',type:'dropdown',writeParms:array{optArray:array{left:'left',right:'right'}}}|array{title:'Signup/Login Placement:',type:'dropdown',writeParms:array{optArray:array{top:'top',bottom:'bottom'}}}
    Open

                        $text .= "<tr><td><b>".$val['title']."</b>:</td><td class='".$tdClass."' colspan='2'>".$frm->renderElement($field, varset($value[$field]), $val)."<div class='field-help'>".varset($val['help'])."</div></td></tr>";
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Suspicious array access to ?mixed
    Open

                        $name .= (string) $var['version'];
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "@attributes" of array type array{name:mixed}|false|string
    Open

            $vars['version']         = varset($vars['@attributes']['version']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "stylesheets" of array type array{@attributes:array{default:0|1}}|array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{category:string}|array{compatibility:''|array|bool|string}|array{css:array{}}|array{csscompliant:mixed}|array{custompages:array|array<int>[]|array{}}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{html:bool}|array{info:mixed}|array{layouts:array|array{}}|array{legacy:false}|array{library:array[]}|array{library:array{}}|array{library:}|array{name:mixed}|array{path:string}|array{preferences:array}|array{preview:mixed,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{preview:mixed|null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed,thumbnail:''|mixed,html:bool,themePrefs:mixed,preferences:array,layouts:array|array{},path:string,custompages:array|array<int>[]|array{},legacy:false,library:array{}}|array{preview:mixed}|array{preview?:null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed}|array{releaseUrl:mixed}|array{themePrefs:mixed,preview:mixed|null,description:mixed,@attributes:array{default:0|1}|mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed,info:mixed,category:string,xhtmlcompliant:mixed,csscompliant:mixed,thumbnail:''|mixed,html:bool}|array{thumbnail:''|mixed}|array{version:mixed}|array{website:mixed}|array{xhtmlcompliant:mixed}|false|string</int></int>
    Open

            if(!empty($vars['stylesheets']['css']))
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

            if (getperms('0') && !empty($_GET['themepreview']))
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Call to method __construct from undeclared class \theme_config_form
    Open

                        $this->themeConfigFormObj = new theme_config_form();
    Severity: Critical
    Found in e107_handlers/theme_handler.php by phan

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

            if(!empty($xmlArray['prefs']['core']))
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Returning type '' but renderSkin() is declared to return array
    Open

                return '';
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Saw possibly unextractable annotation for a fragment of comment '* @param string [optional] $categoryfromXML': after string, did not see an element name (will guess based on comment order)
    Open

         * @param string [optional] $categoryfromXML
    Severity: Info
    Found in e107_handlers/theme_handler.php by phan

    Argument 2 (type) is 'theme' but \e_file::gitPull() takes null defined at /code/e107_handlers/file_class.php:1591
    Open

                $return = e107::getFile()->gitPull($gitTheme, 'theme');
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "html" of array type array{title:'Bootswatch Styles:',type:'dropdown',writeParms:array{optArray:array{cerulean:'Cerulean',cosmo:'Cosmo',cyborg:'Cyborg',darkly:'Darkly',flatly:'Flatly',journal:'Journal',lumen:'Lumen',paper:'Paper',readable:'Readable',sandstone:'Sandstone',simplex:'Simplex',slate:'Slate',spacelab:'Spacelab',superhero:'Superhero',united:'United',yeti:'Yeti'},post:' \x3ca class=\'btn btn-default btn-secondary e-modal\' data-modal-caption="Use the \'Themes\' menu to view the selection." href=\'http://bootswatch.com/default/\'\x3ePreview\x3c/a\x3e',default:'Default'}}|array{title:'Branding:',type:'dropdown',writeParms:array{optArray:array{sitename:'Site Name',logo:'Logo',sitenamelogo:'Logo & Site Name'}}}|array{title:'Navbar Alignment:',type:'dropdown',writeParms:array{optArray:array{left:'left',right:'right'}}}|array{title:'Signup/Login Placement:',type:'dropdown',writeParms:array{optArray:array{top:'top',bottom:'bottom'}}}
    Open

                        $text .= "<tr><td><b>".$val['caption']."</b>:</td><td colspan='2'>".$val['html']."<div class='field-help'>".$val['help']."</div></td></tr>";
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Reference to undeclared constant \ADMIN_FALSE_ICON
    Open

                        $text .= ADMIN_FALSE_ICON;
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    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

            $vars['name']             = varset($vars['@attributes']['name']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "category" of array type array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{compatibility:''|array|bool|string}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{info:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|array{website:mixed}|false|string
    Open

            $vars['category']         = self::getThemeCategory(varset($vars['category']));
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Call to method renderElement from undeclared class \theme_config_form
    Open

                        $text .= "<tr><td><b>".$val['title']."</b>:</td><td class='".$tdClass."' colspan='2'>".$frm->renderElement($field, varset($value[$field]), $val)."<div class='field-help'>".varset($val['help'])."</div></td></tr>";
    Severity: Critical
    Found in e107_handlers/theme_handler.php by phan

    Argument 2 (value) is 0 but \e_form::admin_button() takes string defined at /code/e107_handlers/form_handler.php:4016
    Open

            ".$frm->admin_button('dismiss',0, 'cancel', LAN_NO)."
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    Invalid offset "compliance" of array type array{@attributes:mixed,name:mixed,version:mixed,date:mixed}|array{author:mixed}|array{category:string}|array{compatibility:''|array|bool|string}|array{date:mixed}|array{description:mixed,@attributes:mixed,name:mixed,version:mixed,date:mixed,compatibility:''|array|bool|string,releaseUrl:mixed,email:mixed,website:mixed,author:mixed}|array{email:mixed}|array{info:mixed}|array{name:mixed}|array{releaseUrl:mixed}|array{version:mixed}|array{website:mixed}|false|string
    Open

            $vars['xhtmlcompliant'] = varset($vars['compliance']['@attributes']['xhtml']);
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

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

                foreach($xmlArray['prefs']['core'] as $key=>$val)
    Severity: Minor
    Found in e107_handlers/theme_handler.php by phan

    There are no issues that match your filters.

    Category
    Status