r93626 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93625‎ | r93626 | r93627 >
Date:15:50, 1 August 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
fixes Bug #27543 - “Warning: in_array() [function.in-array]: Wrong datatype for second argument in ParserOptions.php”

AFAICT, result of ParserOutput::getUsedOptions() is only used by ParserOptions::optionsHash() but that method doesn't account for a non-array value.

Patch supplied on bug.
Modified paths:
  • /trunk/phase3/includes/parser/ParserOutput.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserOutput.php
@@ -396,11 +396,11 @@
397397 /**
398398 * Returns the options from its ParserOptions which have been taken
399399 * into account to produce this output or false if not available.
400 - * @return mixed Array/false
 400+ * @return mixed Array
401401 */
402402 public function getUsedOptions() {
403403 if ( !isset( $this->mAccessedOptions ) ) {
404 - return false;
 404+ return array();
405405 }
406406 return array_keys( $this->mAccessedOptions );
407407 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r93627follow up r93626 - Forgot to credit Gero Scholzmah15:54, 1 August 2011
r97263REL1_18 MFT r93626, r96562, r96640, r96978, r97050reedy13:19, 16 September 2011

Comments

#Comment by Platonides (talk | contribs)   20:37, 1 August 2011

My fault. Thanks, Mark.

Status & tagging log