https://bugzilla.wikimedia.org/show_bug.cgi?id=27543

Gero <gero.sch...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gero.sch...@gmx.de

--- Comment #3 from Gero <gero.sch...@gmx.de> 2011-07-30 15:47:57 UTC ---
I maintain DPL and I think the problem lies in ParserOutput.php, line 339.

function getUsedOptions returns "false" if no options exist, but later in
ParserCache.php, line 186 the result is passed to ParserOptions.php, function
optionsHash(..); This function is not aware of the fact that its argument might
not be an array.

I suggest the following BUGFIX:

    /**
     * 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 !! 
            return false;
        }
        return array_keys( $this->mAccessedOptions );
     }

This bugxif works with DPL and I am pretty sure it will also avoid the same
error with any other extension ....

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to