https://bugzilla.wikimedia.org/show_bug.cgi?id=45225

       Web browser: ---
            Bug ID: 45225
           Summary: Postgres version determination incorrect
           Product: MediaWiki
           Version: 1.19.3
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Database
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

In file DatabasePostgresq.php, function getServerVersion() the version_compare
fails and reports that the version is 7.3 or earlier.

This is not just incorrect but misleading during installation.

The call to pg_version() is made with $this->mConn which is null.

A test for $this->mConn == null would avoid the misleading error message.

===================

        function getServerVersion() {
                if ( !isset( $this->numeric_version ) ) {
                        if ($this->mConn == null) {
                           $this->numeric_version = 'No database connection';
                        } else {
                        $versionInfo = pg_version( $this->mConn );
                        if ( version_compare( $versionInfo['client'], '7.4.0',
'lt' ) ) {
                                // Old client, abort install
                                $this->numeric_version = '7.3 or earlier';
                        } elseif ( isset( $versionInfo['server'] ) ) {
                                // Normal client
                                $this->numeric_version =
$versionInfo['server'];
                        } else {
                                // Bug 16937: broken pgsql extension from
PHP<5.3
                                $this->numeric_version = pg_parameter_status(
$this->mConn, 'server_version' );
                        }
                        }
                }
                return $this->numeric_version;
        }

===================

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to