Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php |
— | — | @@ -117,7 +117,13 @@ |
118 | 118 | */ |
119 | 119 | static public function requireFromParserOutput( ParserOutput $parserOutput ) { |
120 | 120 | // Note: we do not attempt to recover which head items where scripts here. |
121 | | - self::$headItems = array_merge( (array)self::$headItems, $parserOutput->getHeadItems() ); |
| 121 | + // ParserOutpt::getHeadItems() was added in MW 1.16 |
| 122 | + if ( is_callable( array( $parserOutput, 'getHeadItems' ) ) ) { |
| 123 | + $parserOutputHeadItems = $parserOutput->getHeadItems(); |
| 124 | + } else { |
| 125 | + $parserOutputHeadItems = (array)$parserOutput->headItems; |
| 126 | + } |
| 127 | + self::$headItems = array_merge( (array)self::$headItems, $parserOutputHeadItems ); |
122 | 128 | /// TODO Is the following needed? |
123 | 129 | if ( isset( $parserOutput->mModules ) ) { |
124 | 130 | foreach ( $parserOutput->mModules as $module ) { |