e107inc/e107

View on GitHub
e107_admin/admin.php

Summary

Maintainability
A
45 mins
Test Coverage
D
64%

Avoid deeply nested control flow statements.
Open

                            if (!array_key_exists(strtolower($fext),$this->allowed_types) )
                            {
                                if ($file == 'index.html' || $file == "null.txt")
                                {
                                    if (filesize($dir.'/'.$file))
Severity: Major
Found in e107_admin/admin.php - About 45 mins to fix

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

        if(!getperms("1") && $adminPref == 1)
    Severity: Minor
    Found in e107_admin/admin.php by phan

    Argument 1 (title) is null but \eMessage::setTitle() takes string defined at /code/e107_handlers/message_handler.php:398
    Open

            e107::getMessage()->setTitle(null,E_MESSAGE_INFO);
    Severity: Minor
    Found in e107_admin/admin.php by phan

    Argument 2 (extensions) is 'jpg,gif,png,jpeg' but \e_file::scandir() takes null defined at /code/e107_handlers/file_class.php:1558
    Open

            $files = e107::getFile()->scandir(e_IMAGE."avatars",'jpg,gif,png,jpeg');
    Severity: Minor
    Found in e107_admin/admin.php by phan

    Found a return statement with a value in the implementation of the magic method \admin_start::__construct, expected void return type
    Open

        function __construct()
    Severity: Info
    Found in e107_admin/admin.php by phan

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

            if(e_AJAX_REQUEST || !getperms('0') || varset($_GET['mode']) === 'customize') // don't display this tuff to regular admins only main admin.
    Severity: Minor
    Found in e107_admin/admin.php by phan

    Argument #1 of this call to \str_replace is typically a literal or constant but isn't, but argument #3 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
    Open

                $message = str_replace($srch,$repl,ADLAN_191);
    Severity: Minor
    Found in e107_admin/admin.php by phan

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

                                            $potential[] = str_replace('../', '', $dir).'/'.$file;
    Severity: Info
    Found in e107_admin/admin.php by phan

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

        $pref['adminstyle'] = 'infopanel'; 
    Severity: Info
    Found in e107_admin/admin.php by phan

    Call to undeclared method \e_db::isTable
    Open

            if(!e107::getDb()->isTable('admin_log')) // Upgrade from v1.x to v2.x required.
    Severity: Critical
    Found in e107_admin/admin.php by phan

    Variable $pref is undeclared
    Open

    if (varset($pref['adminstyle'])=='cascade' || varset($pref['adminstyle'])=='beginner') // Deprecated Admin-include. 
    Severity: Minor
    Found in e107_admin/admin.php by phan

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

                                        $potential[] = str_replace('../', '', $dir).'/'.$file;
    Severity: Info
    Found in e107_admin/admin.php by phan

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

        $width = (getperms('0')) ? "33%" : "50%";
    Severity: Minor
    Found in e107_admin/admin.php by phan

    Argument #1 of this call to \str_replace is typically a literal or constant but isn't, but argument #3 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
    Open

                echo e107::getMessage()->setTitle(ADLAN_190,E_MESSAGE_INFO)->addInfo("<p>".str_replace($srch,$repl,ADLAN_192)."</p>")->render();
    Severity: Minor
    Found in e107_admin/admin.php by phan

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

            if(getperms('0'))
    Severity: Minor
    Found in e107_admin/admin.php by phan

    There are no issues that match your filters.

    Category
    Status