diff --git a/.github/workflows/other-tools.yml b/.github/workflows/other-tools.yml index 29f2798bdd..74708e30d5 100644 --- a/.github/workflows/other-tools.yml +++ b/.github/workflows/other-tools.yml @@ -37,6 +37,9 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Install gettext + run: sudo apt-get install -y gettext + - name: Set up PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 with: @@ -74,9 +77,6 @@ jobs: with: python-version: '3.6' - - name: Install gettext - run: sudo apt-get install -y gettext - - name: Install Sphinx for the documentation build run: pip install 'Sphinx' diff --git a/.github/workflows/test-selenium.yml b/.github/workflows/test-selenium.yml index 03d180e433..014b675a30 100644 --- a/.github/workflows/test-selenium.yml +++ b/.github/workflows/test-selenium.yml @@ -98,9 +98,6 @@ jobs: - name: Install modules run: yarn install --non-interactive --production - - name: Install nginx and php-fpm - run: sudo apt-get install -y nginx php7.2-fpm - - name: Copy the config run: cp test/config.e2e.inc.php config.inc.php diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php index e3b0af7990..1b27e34ba5 100644 --- a/libraries/classes/DatabaseInterface.php +++ b/libraries/classes/DatabaseInterface.php @@ -323,6 +323,10 @@ class DatabaseInterface implements DbalInterface */ public function getTables(string $database, $link = self::CONNECT_USER): array { + if ($database === '') { + return []; + } + $tables = $this->fetchResult( 'SHOW TABLES FROM ' . Util::backquote($database) . ';', null, diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 4b36eb0861..922a48fcd3 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -304,6 +304,9 @@ $optionalParams + + $cfg['Server']['hide_connection_errors'] + $collation_connection $config_data @@ -346,7 +349,7 @@ $this->settings['Servers'][$server] $this->settings['Servers'][$this->settings['ServerDefault']] - + $_SESSION['cache'][$cache_key]['userprefs_mtime'] $_SESSION['cache'][$cache_key]['userprefs_type'] $cfg['LoginCookieValidity'] @@ -366,6 +369,7 @@ $server $server $server[$item] + $server['hide_connection_errors'] $server['host'] $server['port'] $server[substr($key, 8)] @@ -7371,7 +7375,7 @@ $_SESSION['tmpval']['max_rows'] $_SESSION['tmpval']['pos'] - + $alt $defaultFunction $defaultFunction diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php index 296e6a60c5..68864504b5 100644 --- a/test/classes/ConfigTest.php +++ b/test/classes/ConfigTest.php @@ -1218,6 +1218,7 @@ class ConfigTest extends AbstractTestCase 'host' => '', 'controluser' => 'u2', 'controlpass' => 'p2', + 'hide_connection_errors' => false, ]; $cfg_ssl = [ 'user' => 'u', @@ -1226,6 +1227,7 @@ class ConfigTest extends AbstractTestCase 'ssl' => true, 'controluser' => 'u2', 'controlpass' => 'p2', + 'hide_connection_errors' => false, ]; $cfg_control_ssl = [ 'user' => 'u', @@ -1234,6 +1236,7 @@ class ConfigTest extends AbstractTestCase 'control_ssl' => true, 'controluser' => 'u2', 'controlpass' => 'p2', + 'hide_connection_errors' => false, ]; return [ @@ -1254,6 +1257,7 @@ class ConfigTest extends AbstractTestCase 'compress' => false, 'controluser' => 'u2', 'controlpass' => 'p2', + 'hide_connection_errors' => false, ], ], ], @@ -1270,6 +1274,7 @@ class ConfigTest extends AbstractTestCase 'port' => 0, 'ssl' => false, 'compress' => false, + 'hide_connection_errors' => false, ], ], ], @@ -1290,6 +1295,7 @@ class ConfigTest extends AbstractTestCase 'compress' => false, 'controluser' => 'u2', 'controlpass' => 'p2', + 'hide_connection_errors' => false, ], ], ], @@ -1306,6 +1312,7 @@ class ConfigTest extends AbstractTestCase 'port' => 0, 'ssl' => true, 'compress' => false, + 'hide_connection_errors' => false, ], ], ], @@ -1327,6 +1334,7 @@ class ConfigTest extends AbstractTestCase 'controluser' => 'u2', 'controlpass' => 'p2', 'control_ssl' => true, + 'hide_connection_errors' => false, ], ], ], @@ -1343,6 +1351,7 @@ class ConfigTest extends AbstractTestCase 'port' => 0, 'ssl' => true, 'compress' => false, + 'hide_connection_errors' => false, ], ], ],