e107inc/e107

View on GitHub
e107_plugins/download/request.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
12%

Avoid deeply nested control flow statements.
Open

                                if($tmp[0] == $mirror_id)
                                {
                                    $gaddress = trim($address);
                                    $requests++;
                                }
Severity: Major
Found in e107_plugins/download/request.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if($tmp[0] == $mirror_id)
                                {
                                    $gaddress = trim($address);
                                    $requests++;
                                }
    Severity: Major
    Found in e107_plugins/download/request.php - About 45 mins to fix

      Consider simplifying this complex logical expression.
      Open

                          if((!strpos($pref['download_denied'], ".php") &&
                              !strpos($pref['download_denied'], ".htm") &&
                              !strpos($pref['download_denied'], ".html") &&
                              !strpos($pref['download_denied'], ".shtml") ||
                              (strpos($pref['download_denied'], "signup.php") && USER == true)
      Severity: Major
      Found in e107_plugins/download/request.php - About 40 mins to fix

        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

                                e107::getRender()->tablerender(LAN_ERROR, "<div class='alert alert-warning' style='text-align:center'>" . str_replace($search, $replace, LAN_dl_78) . '</div>');
        Severity: Minor
        Found in e107_plugins/download/request.php by phan

        Argument 3 (row) is null but \e107::url() takes array defined at /code/e107_handlers/e107_class.php:4225
        Open

                            $goUrl = e107::url('download', 'index', null, array('query'=>array('action'=>'error','id'=>2)));
        Severity: Minor
        Found in e107_plugins/download/request.php by phan

        Argument 3 (row) is null but \e107::url() takes array defined at /code/e107_handlers/e107_class.php:4225
        Open

                        $goUrl = e107::url('download', 'index', null, array('query' => array('action' => 'error', 'id' => 1))); // ."?action=error&id=1";
        Severity: Minor
        Found in e107_plugins/download/request.php by phan

        Argument 3 (row) is null but \e107::url() takes array defined at /code/e107_handlers/e107_class.php:4225
        Open

                            $goUrl = e107::url('download', 'index', null, array('query'=>array('action'=>'error','id'=>2)));
        Severity: Minor
        Found in e107_plugins/download/request.php by phan

        Argument 3 (row) is null but \e107::url() takes array defined at /code/e107_handlers/e107_class.php:4225
        Open

                                $goUrl = e107::url('download', 'index', null, array('query' => array('action' => 'error', 'id' => 1)));
        Severity: Minor
        Found in e107_plugins/download/request.php by phan

        There are no issues that match your filters.

        Category
        Status