From ef315d737e5225ef2d16b559b1ab03447f7a84c8 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 10 Dec 2010 17:21:09 +0000 Subject: [PATCH] Make load.php output a comment explaining what's going on when no modules were requested rather than outputting nothing. Max made me do this because he hates blank pages --- includes/resourceloader/ResourceLoader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 834acedf1a..f9d29fc7c6 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -409,6 +409,10 @@ class ResourceLoader { public function makeModuleResponse( ResourceLoaderContext $context, array $modules, $missing = array() ) { + if ( $modules === array() && $missing === array() ) { + return '/* No modules requested. Max made me put this here */'; + } + // Pre-fetch blobs if ( $context->shouldIncludeMessages() ) { $blobs = MessageBlobStore::get( $this, $modules, $context->getLanguage() ); -- 2.20.1