Fix broken unit tests post r113487
authorSam Reed <reedy@users.mediawiki.org>
Fri, 9 Mar 2012 18:52:31 +0000 (18:52 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 9 Mar 2012 18:52:31 +0000 (18:52 +0000)
[exec] PHP Fatal error:  Call to a member function getCoreSchema() on a non-object in /var/lib/jenkins/jobs/MediaWiki-postgres-phpunit/workspace/mw-core/includes/db/DatabasePostgres.php on line 216

includes/db/DatabasePostgres.php

index 0155f28..830ac9a 100644 (file)
@@ -213,7 +213,7 @@ class DatabasePostgres extends DatabaseBase {
 
        function hasConstraint( $name ) {
                $SQL = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n WHERE c.connamespace = n.oid AND conname = '" .
-                               pg_escape_string( $this->mConn, $name ) . "' AND n.nspname = '" . pg_escape_string( $this->mConn, $this->mConn->getCoreSchema() ) ."'";
+                               pg_escape_string( $this->mConn, $name ) . "' AND n.nspname = '" . pg_escape_string( $this->mConn, $this->getCoreSchema() ) ."'";
                $res = $this->doQuery( $SQL );
                return $this->numRows( $res );
        }