e107inc/e107

View on GitHub
e107_core/templates/header_default.php

Summary

Maintainability
A
40 mins
Test Coverage
C
71%

Consider simplifying this complex logical expression.
Open

    if($def == 'legacyCustom' || $def=='legacyDefault' )  // 0.6 themes.
    {
      //    echo "MODE 0.6";
        if($def == 'legacyCustom')
        {
Severity: Major
Found in e107_core/templates/header_default.php - About 40 mins to fix

    Reference to undeclared constant \TEXTDIRECTION
    Open

    $htmlTag = "<html".(defined("TEXTDIRECTION") ? " dir='".TEXTDIRECTION."'" : "").(defined("CORE_LC") ? " lang=\"".CORE_LC."\"" : "").">";
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 3 (dep) is 'jquery' but \e107::css() takes null defined at /code/e107_handlers/e107_class.php:2692
    Open

        e107::css('core', 'bootstrap-notify/css/bootstrap-notify.css', 'jquery');
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 1 (name) is 'author' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
    Open

    if(!empty($pref['meta_author'][e_LANGUAGE])) e107::meta('author',$pref['meta_author'][e_LANGUAGE]);
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \HTMLTAG
    Open

    echo (defined('HTMLTAG') ? str_replace('THEME_LAYOUT', THEME_LAYOUT, HTMLTAG) :  $htmlTag)."\n";
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 3 (dep) is 'jquery' but \e107::css() takes null defined at /code/e107_handlers/e107_class.php:2692
    Open

    e107::css('core', 'core/all.jquery.css', 'jquery');
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 1 (name) is 'dcterms.rights' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
    Open

    if(!empty($pref['meta_copyright'][e_LANGUAGE])) e107::meta('dcterms.rights',$pref['meta_copyright'][e_LANGUAGE]);
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \TEXTDIRECTION
    Open

            $e_js->themeCSS(TEXTDIRECTION.'.css');
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \BODYTAG
    Open

        $BODYTAG = str_replace('THEME_LAYOUT', THEME_LAYOUT, BODYTAG);  // BC Fix, but will fail with PHP8.
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \CSSORDER
    Open

    $CSSORDER = deftrue('CSSORDER') ? explode(",",CSSORDER) : array('library', 'other','core','plugin','theme','inline');
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 2 (zone) is false but \e_jsmanager::renderJs() takes int defined at /code/e107_handlers/js_manager.php:1235
    Open

        $e_js->renderJs($cssId, false, 'css');
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \THEME_ONLOAD
    Open

        $js_body_onload[] = THEME_ONLOAD;
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 1 (LAYOUT) is ?array{}|?string|?string[] but \e107::renderLayout() takes string defined at /code/e107_handlers/e107_class.php:338
    Open

               e107::renderLayout($HEADER, $psc);
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 1 (haystack) is ?array{}|?string|?string[] but \strpos() takes string
    Open

        if(!deftrue('e_IFRAME') && (strpos($HEADER, "{ALERTS}") === false && strpos($FOOTER, "{ALERTS}") === false)) // Old theme, missing {ALERTS}
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 2 (content) is 'width=device-width, initial-scale=1.0' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
    Open

    if(defined("VIEWPORT")) e107::meta('viewport',VIEWPORT); //BC ONLY
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \META_MERGE
    Open

    $diz_merge = (defined("META_MERGE") && META_MERGE != FALSE && $pref['meta_description'][e_LANGUAGE]) ? $pref['meta_description'][e_LANGUAGE]." " : "";
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \META_MERGE
    Open

    $key_merge = (defined("META_MERGE") && META_MERGE != FALSE && $pref['meta_keywords'][e_LANGUAGE]) ? $pref['meta_keywords'][e_LANGUAGE]."," : "";
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Call to undeclared function \theme_head()
    Open

        echo theme_head();
    Severity: Critical
    Found in e107_core/templates/header_default.php by phan

    Variable $text is undeclared
    Open

        unset($text);
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Reference to undeclared constant \TEXTDIRECTION
    Open

        if(defined('TEXTDIRECTION') && file_exists(THEME.'/'.strtolower(TEXTDIRECTION).'.css'))
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 3 (subject) is ?array{}|?string|?string[] but \preg_replace() takes array|string
    Open

                $HEADER = preg_replace('#(src|href)=("|\')([^:\'"]*)("|\')#','$1=$2'.THEME.'$3$4', $HEADER);    
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 1 (haystack) is ?array{}|?string|?string[] but \strpos() takes string
    Open

        if(deftrue('e_FRONTPAGE') && ($noBody !== true) && strpos($HEADER, "{WMESSAGE") === false && strpos($FOOTER, "{WMESSAGE") === false) // Auto-detection to override old pref.
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 3 (external) is 'css' but \e_jsmanager::renderJs() takes bool|true defined at /code/e107_handlers/js_manager.php:1235
    Open

        $e_js->renderJs($cssId, false, 'css');
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    Argument 1 (name) is 'viewport' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
    Open

    if(defined("VIEWPORT")) e107::meta('viewport',VIEWPORT); //BC ONLY
    Severity: Minor
    Found in e107_core/templates/header_default.php by phan

    There are no issues that match your filters.

    Category
    Status