Difference between revisions of "Issue:Mediawiki v 1.17"
From FollowTheScore
Redekopmark (talk | contribs) (Created page with "{{Issue |Type = Bug |Extension = DPL |Version = all |Description = warnings generated when using dpl with 1.17 |Status = open }} == Problem == after upg...") |
Redekopmark (talk | contribs) m (→Reply) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
after upgrading to mw 1.17 various dpl calls generate the following warnings, | after upgrading to mw 1.17 various dpl calls generate the following warnings, | ||
+ | <pre> | ||
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 274 | Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 274 | ||
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 289 | Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 289 | ||
Line 16: | Line 17: | ||
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 302 | Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 302 | ||
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 317 | Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 317 | ||
+ | </pre> | ||
this can cause when using the namespace parameter in a dpl call, also when using {{#dpl:|title=Main|include={TestTemplate}:desc}} | this can cause when using the namespace parameter in a dpl call, also when using {{#dpl:|title=Main|include={TestTemplate}:desc}} | ||
Line 22: | Line 24: | ||
== Reply == | == Reply == | ||
+ | |||
+ | This seems to be a bug in MediaWiki itself. Bugfix for ParserOutput.php, line 340: | ||
+ | |||
+ | /** | ||
+ | * Returns the options from its ParserOptions which have been taken | ||
+ | * into account to produce this output or false if not available. | ||
+ | * @return mixed Array/false | ||
+ | */ | ||
+ | public function getUsedOptions() { | ||
+ | if ( !isset( $this->mAccessedOptions ) ) { | ||
+ | return array(); // bugfix: return empty array instead of false | ||
+ | return false; | ||
+ | } | ||
+ | return array_keys( $this->mAccessedOptions ); | ||
+ | } | ||
+ | |||
+ | This should help. | ||
+ | |||
+ | :thanks, it appears to be fixed now [[User:Redekopmark|Redekopmark]] 18:18, 30 July 2011 (CEST) |
Latest revision as of 17:18, 30 July 2011
Description: | warnings generated when using dpl with 1.17 |
Extension / Version: | DPL / all |
Type / Status: | Bug / open |
Problem
after upgrading to mw 1.17 various dpl calls generate the following warnings,
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 274 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 289 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 292 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 297 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 302 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/aiowiki/aiowiki/w/includes/parser/ParserOptions.php on line 317this can cause when using the namespace parameter in a dpl call, also when using
Extension:DynamicPageList (DPL), version 3.2.1: Warning: No results.
the templates and calls haven't been changed from before the upgrade and were working perfectly in 1.16.5, also the dpl call still gives the correct results
Reply
This seems to be a bug in MediaWiki itself. Bugfix for ParserOutput.php, line 340:
/** * Returns the options from its ParserOptions which have been taken * into account to produce this output or false if not available. * @return mixed Array/false */ public function getUsedOptions() { if ( !isset( $this->mAccessedOptions ) ) { return array(); // bugfix: return empty array instead of false return false; } return array_keys( $this->mAccessedOptions ); }
This should help.
- thanks, it appears to be fixed now Redekopmark 18:18, 30 July 2011 (CEST)