http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88194
Revision: 88194
Author: yaron
Date: 2011-05-15 16:27:50 +0000 (Sun, 15 May 2011)
Log Message:
-----------
Added check so that a null parser output doesn't lead to warnings
Modified Paths:
--------------
trunk/extensions/SemanticForms/specials/SF_RunQuery.php
Modified: trunk/extensions/SemanticForms/specials/SF_RunQuery.php
===================================================================
--- trunk/extensions/SemanticForms/specials/SF_RunQuery.php 2011-05-15
16:19:39 UTC (rev 88193)
+++ trunk/extensions/SemanticForms/specials/SF_RunQuery.php 2011-05-15
16:27:50 UTC (rev 88194)
@@ -84,8 +84,12 @@
global $wgUser, $wgTitle, $wgOut;
$wgParser->mOptions = new ParserOptions();
$wgParser->mOptions->initialiseFromUser( $wgUser );
+ // @TODO - fix RunQuery's parsing so that this check
+ // isn't needed.
+ if ( $wgParser->getOutput() == null ) {
+ $headItems = array();
// method was added in MW 1.16
- if ( method_exists( $wgParser->getOutput(),
'getHeadItems' ) ) {
+ } elseif ( method_exists( $wgParser->getOutput(),
'getHeadItems' ) ) {
$headItems =
$wgParser->getOutput()->getHeadItems();
} else {
$headItems = $wgParser->getOutput()->mHeadItems;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs