Skip to content

Commit

Permalink
Merge pull request #6493 from rxu/ticket/17148
Browse files Browse the repository at this point in the history
[ticket/17148] Fix sql_table_exists() error for PostgreSQL 9.3 and earlier - 3.3.x
  • Loading branch information
marc1706 committed Jun 26, 2023
2 parents 0fdc765 + 8c33a21 commit 5ee2efd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion phpBB/phpbb/db/tools/postgres.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function sql_list_tables()
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)";
Expand Down

0 comments on commit 5ee2efd

Please sign in to comment.