From 8c33a2180da2f1a2bed88a134f8a878932957736 Mon Sep 17 00:00:00 2001 From: rxu Date: Sat, 17 Jun 2023 12:36:29 +0700 Subject: [PATCH 1/2] [ticket/17148] Fix sql_table_exists() error for PostgreSQL 9.3 and earlier PostgreSQL 9.3 and earlier versions don't support Empty SELECT lists (support was added since v. 9.4). Also add PostgreSQL 9.3 tests as earlier images fail in current tests env. PHPBB3-17148 --- .github/workflows/tests.yml | 4 +++- phpBB/phpbb/db/tools/postgres.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a2a2f7e0a..69a3716698 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -233,6 +233,8 @@ jobs: strategy: matrix: include: + - php: '7.1' + db: "postgres:9.3" - php: '7.1' db: "postgres:9.5" - php: '7.1' @@ -264,7 +266,7 @@ jobs: services: postgres: - image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }} + image: ${{ matrix.db != 'postgres:9.3' && matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }} env: POSTGRES_HOST: localhost POSTGRES_USER: postgres diff --git a/phpBB/phpbb/db/tools/postgres.php b/phpBB/phpbb/db/tools/postgres.php index 748d0c0821..2074dbc96b 100644 --- a/phpBB/phpbb/db/tools/postgres.php +++ b/phpBB/phpbb/db/tools/postgres.php @@ -102,7 +102,7 @@ class postgres extends tools function sql_table_exists($table_name) { $sql = "SELECT CAST(EXISTS( - SELECT FROM information_schema.tables + SELECT * FROM information_schema.tables WHERE table_schema = 'public' AND table_name = '" . $this->db->sql_escape($table_name) . "' ) AS INTEGER)"; From bcf1befef89f9cf3924791d1eb688a1a15e9b9d0 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 18 Jun 2023 10:29:26 +0700 Subject: [PATCH 2/2] [ticket/17148] Bump PostgreSQL minimum requirement to 9.4+ master branch uses Doctrine 3 which provides specific platform only for PostgreSQL 9.4 and above. Also bump maximum PHP requirement to PHP 8.2 as it is infact. PHPBB3-17148 --- phpBB/docs/INSTALL.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index fa8d190ac7..1e73e19cd9 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -141,13 +141,13 @@ -
  • PHP 7.3.0+ up to and including PHP 8.1 with support for the database you intend to use.
  • +
  • PHP 7.3.0+ up to and including PHP 8.2 with support for the database you intend to use.
  • The following PHP modules are required:
    • json