diff --git a/db_operations.php b/db_operations.php index 36a481897e..f9d72e7bb5 100644 --- a/db_operations.php +++ b/db_operations.php @@ -30,7 +30,7 @@ if (! defined('ROOT_PATH')) { define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR); } -global $cfg, $db, $url_query; +global $cfg, $db, $server, $url_query; require_once ROOT_PATH . 'libraries/common.inc.php'; diff --git a/index.php b/index.php index d1b08ae039..74c6509d65 100644 --- a/index.php +++ b/index.php @@ -19,6 +19,8 @@ if (! defined('ROOT_PATH')) { define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR); } +global $server; + require_once ROOT_PATH . 'libraries/common.inc.php'; /** diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5dd4d07092..761395ca19 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -15,7 +15,7 @@ parameters: - '#Access to an undefined property PhpMyAdmin\\TwoFactor\:\:\$(backend|showSubmit|available|writable)#' - '#Call to an undefined method PhpMyAdmin\\Navigation\\Nodes\\Node\:\:getHiddenCount#' - '#Undefined variable: \$array#' - - '#Undefined variable: \$(server|action|sql_query|export_type|err_url|collation_connection|filename_template|transform_key|cn|goto|token_mismatch|auth_plugin|username|hostname|display_query)#'#Others + - '#Undefined variable: \$(action|sql_query|export_type|err_url|collation_connection|filename_template|transform_key|cn|goto|token_mismatch|auth_plugin|username|hostname|display_query)#'#Others - '#Undefined variable: \$(unsaved_values|is_upload)#'#tbl_change.php - '#Undefined variable: \$max_upload_size#'#tbl_import.php - '#Undefined variable: \$(repobase|fullrevision|revision|repobranchbase|branch)#'#Footer.php