From: Brion Vibber Date: Fri, 6 Apr 2007 19:21:35 +0000 (+0000) Subject: Old cached ParserOutput entries will have null for mHeadItems instead of an array. X-Git-Tag: 1.31.0-rc.0~53460 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=49186d3456e5b2b458d9905dc5f56c8907524989;p=lhc%2Fweb%2Fwiklou.git Old cached ParserOutput entries will have null for mHeadItems instead of an array. 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. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b565e2a71b..c7f7cbc81c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 ) ); }