r88930 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88929‎ | r88930 | r88931 >
Date:20:38, 26 May 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
It's not just for < 5.1!
Modified paths:
  • /trunk/phase3/includes/FakeTitle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FakeTitle.php
@@ -6,10 +6,6 @@
77 class FakeTitle extends Title {
88 function error() { throw new MWException( "Attempt to call member function of FakeTitle\n" ); }
99
10 - // PHP 5.1 method overload
11 - function __call( $name, $args ) { $this->error(); }
12 -
13 - // PHP <5.1 compatibility
1410 function isLocal() { $this->error(); }
1511 function isTrans() { $this->error(); }
1612 function getText() { $this->error(); }
@@ -33,7 +29,7 @@
3430 function getSubpageText() { $this->error(); }
3531 function getSubpageUrlForm() { $this->error(); }
3632 function getPrefixedURL() { $this->error(); }
37 - function getFullURL( $query = '', $variant = false ) {$this->error(); }
 33+ function getFullURL( $query = '', $variant = false ) { $this->error(); }
3834 function getLocalURL( $query = '', $variant = false ) { $this->error(); }
3935 function getLinkUrl( $query = array(), $variant = false ) { $this->error(); }
4036 function escapeLocalURL( $query = '' ) { $this->error(); }

Comments

#Comment by 😂 (talk | contribs)   21:01, 26 May 2011

Adding a note to this: __call() won't work for FakeTitle since parent::method() is called before __call(). As a result, all the __call() was doing was hiding an E_FATAL for calling $fake->gobbledyGook();

Status & tagging log