e107inc/e107

View on GitHub
class2.php

Summary

Maintainability
A
1 hr
Test Coverage
F
20%

Avoid too many return statements within this method.
Open

    return false;
Severity: Major
Found in class2.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

        return $latchedAccess;
    Severity: Major
    Found in class2.php - About 30 mins to fix

      Variable $mySQLpassword is undeclared
      Open

          $legacy_sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
      Severity: Minor
      Found in class2.php by phan

      Variable $mySQLprefix is undeclared
      Open

          $legacy_sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
      Severity: Minor
      Found in class2.php by phan

      Call to undeclared method \e_db::db_Connect
      Open

      $merror=$sql->db_Connect($sql_info['server'], $sql_info['user'], $sql_info['password'], $sql_info['defaultdb']);
      Severity: Critical
      Found in class2.php by phan

      Argument 6 (secure) is int but \setcookie() takes bool
      Open

          setcookie($name, $value, $expire, $path, $domain, $secure, true);
      Severity: Minor
      Found in class2.php by phan

      Argument 2 (parseBB) is '' but \e_parse::toHTML() takes bool|false defined at /code/e107_handlers/e_parse_class.php:1532
      Open

          define('SITENAME', trim($tp->toHTML($pref['sitename'], '', 'USER_TITLE,er_on,defs')));
      Severity: Minor
      Found in class2.php by phan

      Argument 2 (default) is false but \e107::getRegistry() takes null defined at /code/e107_handlers/e107_class.php:865
      Open

          return e107::getRegistry('core/cachedvars/'.$id, false);
      Severity: Minor
      Found in class2.php by phan

      Argument 4 (noWhere) is 'no_where' but \e_db::select() takes bool|false defined at /code/e107_handlers/e_db_interface.php:265
      Open

                  $sql->select($table, '*', 'ORDER BY '.$orderfield.' DESC LIMIT 1', 'no_where');
      Severity: Minor
      Found in class2.php by phan

      Argument 6 (secure) is int but \setcookie() takes bool
      Open

              setcookie($name, $value, $expire, $path, $domain, $secure, true);
      Severity: Minor
      Found in class2.php by phan

      Call to undeclared method \e_db::db_SetErrorReporting
      Open

      $sql->db_SetErrorReporting(false);
      Severity: Critical
      Found in class2.php by phan

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

                  $backtrace[0] = (isset($trace[1]) ? $trace[1] : "");
      Severity: Info
      Found in class2.php by phan

      Suspicious array access to nullable ?array|?mixed|?string
      Open

                  $text .= str_replace($this->docroot,'', $val['file']).":".$val['line'];
      Severity: Minor
      Found in class2.php by phan

      Argument 2 (parseBB) is '' but \e_parse::toHTML() takes bool|false defined at /code/e107_handlers/e_parse_class.php:1532
      Open

          define('SITEDESCRIPTION', $tp->toHTML($pref['sitedescription'], '', 'emotes_off,defs'));
      Severity: Minor
      Found in class2.php by phan

      Returning type string but include_lan() is declared to return bool
      Open

          return e107::includeLan($path, $force);
      Severity: Minor
      Found in class2.php by phan

      Variable $mySQLuser is undeclared
      Open

          $legacy_sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
      Severity: Minor
      Found in class2.php by phan

      Variable $dirPaths is undeclared
      Open

      unset($dirPaths,$e107_paths);
      Severity: Minor
      Found in class2.php by phan

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

                      $backtrace[0] = (isset($trace[1]) ? $trace[1] : "");
      Severity: Info
      Found in class2.php by phan

      Argument 1 (options) is null but \debug_backtrace() takes bool|int
      Open

              e107::getMessage()->addDebug('Deprecated get_user_data() backtrace:<pre>'."\n".print_r(debug_backtrace(null,2), true).'</pre>');
      Severity: Minor
      Found in class2.php by phan

      Argument 3 (expires) is string but \setcookie() takes int
      Open

              setcookie($name, $value, $expire, $path, $domain, $secure, true);
      Severity: Minor
      Found in class2.php by phan

      Suspicious array access to ?mixed
      Open

                  $text .= str_replace($this->docroot,'', $val['file']).":".$val['line'];
      Severity: Minor
      Found in class2.php by phan

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

              $index = 0; $colours[0] = "#C1C1C1"; $colours[1] = "#B6B6B6";
      Severity: Info
      Found in class2.php by phan

      Returning type null but cookie() is declared to return void
      Open

              return null;
      Severity: Minor
      Found in class2.php by phan

      Variable $mySQLserver is undeclared
      Open

          $legacy_sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
      Severity: Minor
      Found in class2.php by phan

      Argument 2 (parseBB) is '' but \e_parse::toHTML() takes bool|false defined at /code/e107_handlers/e_parse_class.php:1532
      Open

      define('SITEDISCLAIMER', $tp->toHTML($pref['sitedisclaimer'], '', 'emotes_off,defs'));
      Severity: Minor
      Found in class2.php by phan

      Variable $user is undeclared
      Open

          define('ADMINID', $user->getAdminId());
      Severity: Minor
      Found in class2.php by phan

      Returning type null but handle_error() is declared to return bool
      Open

              return null;
      Severity: Minor
      Found in class2.php by phan

      Reference to undeclared property \e_db->mySQLlanguage
      Open

          $sql2->mySQLlanguage = e_LANGUAGE;
      Severity: Minor
      Found in class2.php by phan

      Variable $tp is undeclared
      Open

      define('SITECONTACTINFO', (!empty($pref['sitecontactinfo']) ? $tp->toHTML($pref['sitecontactinfo'], true, 'emotes_off,defs') : ''));
      Severity: Minor
      Found in class2.php by phan

      Argument 1 (options) is null but \debug_backtrace() takes bool|int
      Open

                  'Call to deprecated function get_user_data() (class2.php) '."\n".print_r(debug_backtrace(null,2), true),
      Severity: Minor
      Found in class2.php by phan

      Variable $user is undeclared
      Open

          define('ADMINPWCHANGE', $user->getAdminPwchange());
      Severity: Minor
      Found in class2.php by phan

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

                      $error['short'] = "&nbsp;&nbsp;&nbsp;&nbsp;Internal Error Message: {$message}, Line <mark>{$line}</mark> of {$file}<br />\n";
      Severity: Info
      Found in class2.php by phan

      Reference to undeclared property \e_db->mySQLlanguage
      Open

          $sql->mySQLlanguage  = e_LANGUAGE;
      Severity: Minor
      Found in class2.php by phan

      Reference to undeclared constant \FORCE_USERUPDATE
      Open

          if (defset('e_PAGE') === 'usersettings.php' || defset('e_REQUEST_URI') === e107::url('user/myprofile/edit') || (defined('FORCE_USERUPDATE') && !FORCE_USERUPDATE) || strpos(e_SELF, ADMINDIR))
      Severity: Minor
      Found in class2.php by phan

      There are no issues that match your filters.

      Category
      Status