Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-14702

DB Tools sql_column_exists() broken in postgresql

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Closed
    • Icon: Major Major
    • None
    • 3.2.0-RC1
    • None
    • production and testing

      In postgresql, the sql_column_exists() method from db_tools is broken, and always returns false.

      phpBB Debug] PHP Notice: in file [ROOT]/phpbb/db/tools/tools.php on line 925: Undefined variable: sql
      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/postgres.php on line 286: pg_fetch_assoc(): 28 is not a valid PostgreSQL result resource
      boolean false
      

      $sql on line 925 is undefined in postgresql. However, it appears that when using postgresql, the postgresql db_tools child class is never actually called.

      it looks like the tools factory is not working as expected. When using a postgresql, the tools factory sees the db_driver as an instance of the phpbb\db\driver\factory, so the factory still loads the standard tools class instead of postgresql (or mssql).

      This is major since this test is used in a lot of effectively installed checks in migrations.

            Unassigned Unassigned
            VSE Matt Friedman [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: