From 3e2628fb736403acbdc41cd38d79b861059968f6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 9 Sep 2023 12:27:52 +0200 Subject: [PATCH] [ticket/17176] Ensure slow tests are not run when not selected PHPBB3-17176 --- .github/workflows/tests.yml | 8 ++++---- phpBB/phpbb/auth/provider/ldap.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6db9ec01d9..1ae1303623 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -125,12 +125,12 @@ jobs: - php: '8.1' db: "mysql:5.7" db_alias: "MySQL Slow Tests" - type: 'unit' + type: 'slow' SLOWTESTS: 1 - php: '8.1' db: "mysql:5.7" db_alias: "MyISAM Tests" - type: 'functional' + type: 'MyISAM' MYISAM: 1 name: ${{ matrix.type }} - PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} @@ -225,7 +225,7 @@ jobs: DB: ${{steps.database-type.outputs.db}} if: ${{ matrix.SLOWTESTS != 1 && matrix.NOTESTS != 1 && matrix.type == 'unit' }} run: | - phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error --exclude-group functional + phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error --exclude-group functional,slow - name: Run functional tests env: @@ -566,7 +566,7 @@ jobs: - name: Run unit tests if: ${{ matrix.type == 'unit' }} run: | - phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --exclude-group functional + phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --exclude-group functional,slow - name: Run functional tests if: ${{ matrix.type == 'functional' }} run: | diff --git a/phpBB/phpbb/auth/provider/ldap.php b/phpBB/phpbb/auth/provider/ldap.php index 9daad9e5f6..69c0952f1d 100644 --- a/phpBB/phpbb/auth/provider/ldap.php +++ b/phpBB/phpbb/auth/provider/ldap.php @@ -201,7 +201,7 @@ class ldap extends base 1 ); - $ldap_result = @ldap_get_entries($ldap, $search); + $ldap_result = $search !== false ? @ldap_get_entries($ldap, $search) : []; if (is_array($ldap_result) && count($ldap_result) > 1) {