From 3b7e79486f28911fe5b3836e817b7bc56b87a20a Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 16 Apr 2012 12:17:02 -0700 Subject: [PATCH] Put the filecache save step before the error buffer closes so those errors don't break the output. Change-Id: Icee6e97002ca9ac9dc76dcb6cd9a3badf7d2b8db --- includes/resourceloader/ResourceLoader.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 7a036b8542..71b2c59479 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -500,10 +500,6 @@ class ResourceLoader { $response = $this->makeComment( $warnings ) . $response; } - // Remove the output buffer and output the response - ob_end_clean(); - echo $response; - // Save response to file cache unless there are errors if ( isset( $fileCache ) && !$errors && !$missing ) { // Cache single modules...and other requests if there are enough hits @@ -516,6 +512,10 @@ class ResourceLoader { } } + // Remove the output buffer and output the response + ob_end_clean(); + echo $response; + wfProfileOut( __METHOD__ ); } -- 2.20.1