Last modified: 2014-05-20 08:36:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67419, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65419 - Fatal error: Call to a member function on a non-object in Parser.php
Fatal error: Call to a member function on a non-object in Parser.php
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-16 21:25 UTC by TeleComNasSprVen
Modified: 2014-05-20 08:36 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description TeleComNasSprVen 2014-05-16 21:25:02 UTC
Lots of Parser.php fatal errors.

Fatal error: Call to a member function merge() on a non-object in Parser.php on line 1965.
Fatal error: Call to a member function getTargetLanguage() on a non-object in Parser.php on line 948.
Comment 1 TeleComNasSprVen 2014-05-17 08:28:18 UTC
Another one:

Fatal error: Call to a member function registerWatcher() on a non-object in Parser.php on line 295.
Comment 2 Andre Klapper 2014-05-19 11:09:37 UTC
(In reply to TeleComNasSprVen from comment #0)
> Lots of Parser.php fatal errors.

Where? In which exact MediaWiki version? How to reproduce?
Comment 3 TeleComNasSprVen 2014-05-20 03:36:23 UTC
(In reply to Andre Klapper from comment #2)
> (In reply to TeleComNasSprVen from comment #0)
> > Lots of Parser.php fatal errors.
> 
> Where? In which exact MediaWiki version? How to reproduce?

Version 1.23

I think I tried to do
$parser = new Parser();
$replacedtext = $parser->replaceInternalLinks( $wikitext );
Comment 4 Andre Klapper 2014-05-20 08:28:00 UTC
Which *exact* version? Is that 1.23-rc1 or 1.23-rc2?

> I think I tried to do

Where? Complete steps to reproduce would be helpful. :)
Comment 5 Bartosz Dziewoński 2014-05-20 08:36:30 UTC
(In reply to TeleComNasSprVen from comment #3)
> I think I tried to do
> $parser = new Parser();
> $replacedtext = $parser->replaceInternalLinks( $wikitext );

You're not supposed to do that. Yeah, the Parser sucks, we know. :)

You initialized a Parser object with null $mOptions field (that should be a ParserOptions instance) and call funny methods on it, so you get fatals. That's expected, if unfortunate, behavior.

replaceInternalLinks() should really be a private method, it expects to only be called from within parse() (which sets $mOptions).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links