Author: isaka
Description:
patch of Cite.php rev.16633
;Environment:
:MediaWiki 1.6.10 with 2 extentions;
:*Cite (Cite.php rev.16633)
:*ParserFunctions (ParserFunctions.php rev.24913)
:*:patched: http://meta.wikimedia.org/wiki/Help:ParserFunctions#1.6
:PHP 4.4.7 (cgi)
:MySQL 4.0.27
:FreeBSD 6.1R
;Problem appears:
*Using Cite only -> no problem
*Using ParserFunctions only -> no problem
*Using both -> failed with "Unknown datatype in hooks for ParserClearState"
*:Backtrace:
<pre>
array(1) { ["ParserClearState"]=> array(2) { [0]=> array(2) { [0]=> &NULL [1]=> string(10) "clearState" } [1]=> array(2) { [0]=> &object(extparserfunctions)(4) { ["mExprParser"]=> NULL ["mTimeCache"]=> array(0) { } ["mTimeChars"]=> int(0) ["mMaxTimeChars"]=> int(1000) } [1]=> string(10) "clearState" } } } Unknown datatype in hooks for ParserClearState
Backtrace:
- GlobalFunctions.php line 602 calls wfbacktrace()
- Hooks.php line 85 calls wfdebugdiebacktrace()
- Parser.php line 172 calls wfrunhooks()
- Parser.php line 3507 calls parser::clearstate()
- MessageCache.php line 457 calls parser::transformmsg()
- MessageCache.php line 406 calls messagecache::transform()
- GlobalFunctions.php line 449 calls messagecache::get()
- GlobalFunctions.php line 408 calls wfmsggetkey()
- GlobalFunctions.php line 361 calls wfmsgreal()
- EditPage.php line 837 calls wfmsgforcontent()
- EditPage.php line 307 calls editpage::showeditform()
- EditPage.php line 147 calls editpage::edit()
- Wiki.php line 381 calls editpage::submit()
- Wiki.php line 50 calls mediawiki::performaction()
- index.php line 123 calls mediawiki::initialize()
</pre>
;Solution:
:I'm tracing source, and find a procedure to call ParserClearState before defining $wgHooks in Cite.php. Patched version of Cite.php is worked with ParserFunctions under the environment as above.
Version: 1.6.x
Severity: major
Attached: