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.
This commit is contained in:
Mark A. Hershberger 2011-08-01 15:50:49 +00:00
parent e201e2307d
commit cb2105b6a1

View file

@ -396,11 +396,11 @@ class ParserOutput extends CacheTime {
/**
* 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
* @return mixed Array
*/
public function getUsedOptions() {
if ( !isset( $this->mAccessedOptions ) ) {
return false;
return array();
}
return array_keys( $this->mAccessedOptions );
}