Difference between revisions of "Issue:Mediawiki v 1.17"
From FollowTheScore
(→Reply) |
|||
Line 27: | Line 27: | ||
This seems to be a bug in MediaWiki itself. Bugfix for ParserOutput.php, line 340: | 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. | This should help. |
Revision as of 14:00, 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.