r58575 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58574‎ | r58575 | r58576 >
Date:08:55, 5 November 2009
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
Make newFromID() inherit correctly (ImagePage/CategoryPage...) by using Late Static Binding
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -60,7 +60,7 @@
6161 */
6262 public static function newFromID( $id ) {
6363 $t = Title::newFromID( $id );
64 - return $t == null ? null : new Article( $t );
 64+ return $t == null ? null : new static( $t );
6565 }
6666
6767 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r58586Holding off r58575 for nowaaron16:30, 5 November 2009

Comments

#Comment by Catrope (talk | contribs)   11:57, 5 November 2009

This breaks on PHP 5.2, because late static binding was introduced in PHP 5.3.

Status & tagging log