r108164 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108163‎ | r108164 | r108165 >
Date:18:49, 5 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Followup r107932

Check random class to be isntantiated is a subclass of DatabaseBase
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -686,7 +686,7 @@
687687 isset( $p['flags'] ) ? $p['flags'] : 0,
688688 isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : 'get from global'
689689 );
690 - } elseif ( class_exists( $class ) ) {
 690+ } elseif ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) {
691691 return new $class( $p );
692692 } else {
693693 return null;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107932Fix Bug 33384 - database drivers cannot be provided by extension...mah19:55, 3 January 2012

Status & tagging log