Author: dale
Description:
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;
}Version: 1.19.3
Severity: normal
OS: Linux
Platform: PC
Whiteboard: aklapper-moreinfo
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=16937
https://bugzilla.wikimedia.org/show_bug.cgi?id=28162