r113498 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113497‎ | r113498 | r113499 >
Date:18:52, 9 March 2012
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Fix broken unit tests post r113487

[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
Modified paths:
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -213,7 +213,7 @@
214214
215215 function hasConstraint( $name ) {
216216 $SQL = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n WHERE c.connamespace = n.oid AND conname = '" .
217 - pg_escape_string( $this->mConn, $name ) . "' AND n.nspname = '" . pg_escape_string( $this->mConn, $this->mConn->getCoreSchema() ) ."'";
 217+ pg_escape_string( $this->mConn, $name ) . "' AND n.nspname = '" . pg_escape_string( $this->mConn, $this->getCoreSchema() ) ."'";
218218 $res = $this->doQuery( $SQL );
219219 return $this->numRows( $res );
220220 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r113500PHP Fatal error: Call to undefined method DatabasePostgres::getCoreSchea() i...reedy19:01, 9 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113487Handle PostgreSQL transaction errors and improve schema detection...saper17:24, 9 March 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   22:02, 9 March 2012
	/**
	 * @var DatabaseBase
	 */
	protected $mConn = null;

DatabaseBase docs are misleading.

Status & tagging log