Page MenuHomePhabricator

PHP Fatal error: Using $this when not in object context
Closed, InvalidPublic

Description

In SpecialWikilog.php, line 354 we have $this in a static method:

$fields['wikilog'] = Xml::inputLabelSep(
        $this->msg( 'wikilog-form-wikilog' )->text(), 'wikilog', 'wl-wikilog', 40,
        str_replace( '_', ' ', $opts->consumeValue( 'wikilog' ) )
);

This leads to the following error:

PHP message: PHP Fatal error:  Using $this when not in object context in /var/www/withoutvowels/web/w/extensions/Wikilog/SpecialWikilog.php on line 354" while reading response header from upstream, client: 31.210.180.196, server: withoutvowels.org, request: "GET /wiki/Special:Wikilog HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm-withoutvowels.sock:", host: "withoutvowels.org", referrer: "https://withoutvowels.org/wiki/Help:Special:Wikilog"

It is Wikilog identified as 1.3.0 from https://phabricator.wikimedia.org/diffusion/EWLG/repository/master/.

Details

Event Timeline

Aklapper renamed this task from A Wikilog programming error to PHP Fatal error: Using $this when not in object context.Jan 2 2017, 8:01 PM

Change 330180 had a related patch set (by Paladox) published:
Use wfMessage instead of $this->msg

https://gerrit.wikimedia.org/r/330180

Change 330180 abandoned by Florianschmidtwelzow:
Use wfMessage instead of $this->msg

Reason:
Done in: Icb86a0

https://gerrit.wikimedia.org/r/330180