Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -84,8 +84,12 @@ |
85 | 85 | global $wgUser, $wgTitle, $wgOut; |
86 | 86 | $wgParser->mOptions = new ParserOptions(); |
87 | 87 | $wgParser->mOptions->initialiseFromUser( $wgUser ); |
| 88 | + // @TODO - fix RunQuery's parsing so that this check |
| 89 | + // isn't needed. |
| 90 | + if ( $wgParser->getOutput() == null ) { |
| 91 | + $headItems = array(); |
88 | 92 | // method was added in MW 1.16 |
89 | | - if ( method_exists( $wgParser->getOutput(), 'getHeadItems' ) ) { |
| 93 | + } elseif ( method_exists( $wgParser->getOutput(), 'getHeadItems' ) ) { |
90 | 94 | $headItems = $wgParser->getOutput()->getHeadItems(); |
91 | 95 | } else { |
92 | 96 | $headItems = $wgParser->getOutput()->mHeadItems; |