Last modified: 2014-08-26 19:18:36 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 T72046, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70046 - Preprocessor_DOM causes fatal errors when called in certain ways
Preprocessor_DOM causes fatal errors when called in certain ways
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-26 15:18 UTC by Jackmcbarn
Modified: 2014-08-26 19:18 UTC (History)
0 users

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


Attachments

Description Jackmcbarn 2014-08-26 15:18:48 UTC
Given the following Lua module:

local p = {}

function p.main(frame)
	return 'Hello world'
end

function p.fnOnly(frame)
	return mw.getCurrentFrame():callParserFunction('#invoke',{'Sandbox/Jackmcbarn', 'main'})
end

function p.oneArg(frame)
	return mw.getCurrentFrame():callParserFunction('#invoke',{'Sandbox/Jackmcbarn', 'main', 'baz'})
end

function p.twoArgs(frame)
	return mw.getCurrentFrame():callParserFunction('#invoke',{'Sandbox/Jackmcbarn', 'main', 'baz', 'qux'})
end

return p


Any call to twoArgs will result in "PHP fatal error in /usr/local/apache/common-local/php-1.24wmf17/includes/parser/Preprocessor_DOM.php line 1042:
Call to a member function item() on a non-object". This only occurs on wikis that use Preprocessor_DOM rather than Preprocessor_Hash.
Comment 1 Gerrit Notification Bot 2014-08-26 15:22:56 UTC
Change 156299 had a related patch set uploaded by Anomie:
Handle multiple ownerDocuments for args in Preprocessor_DOM

https://gerrit.wikimedia.org/r/156299
Comment 2 Gerrit Notification Bot 2014-08-26 15:46:11 UTC
Change 156299 merged by jenkins-bot:
Handle multiple ownerDocuments for args in Preprocessor_DOM

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

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


Navigation
Links