Old cached ParserOutput entries will have null for mHeadItems instead of an array.
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Apr 2007 19:21:35 +0000 (19:21 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Apr 2007 19:21:35 +0000 (19:21 +0000)
We could force them to clear from cache by bumping the parser version, but that
shouldn't be necessary here; just casting to (array) to avoid spewing warnings.

includes/OutputPage.php

index b565e2a..c7f7cbc 100644 (file)
@@ -367,7 +367,7 @@ class OutputPage {
                        $this->mSubtitle .= $parserOutput->mSubtitle ;
                }
                $this->mNoGallery = $parserOutput->getNoGallery();
-               $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->mHeadItems );
+               $this->mHeadItems = array_merge( $this->mHeadItems, (array)$parserOutput->mHeadItems );
                wfRunHooks( 'OutputPageParserOutput', array( &$this, $parserOutput ) );
        }