fixes Bug #27543 - “Warning: in_array() [function.in-array]: Wrong datatype for secon...
authorMark A. Hershberger <mah@users.mediawiki.org>
Mon, 1 Aug 2011 15:50:49 +0000 (15:50 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Mon, 1 Aug 2011 15:50:49 +0000 (15:50 +0000)
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.

includes/parser/ParserOutput.php

index 55dfba2..363da78 100644 (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 );
         }