Put the filecache save step before the error buffer closes so those errors don't...
authorAaron <aschulz@wikimedia.org>
Mon, 16 Apr 2012 19:17:02 +0000 (12:17 -0700)
committerAaron <aschulz@wikimedia.org>
Mon, 16 Apr 2012 19:17:02 +0000 (12:17 -0700)
Change-Id: Icee6e97002ca9ac9dc76dcb6cd9a3badf7d2b8db

includes/resourceloader/ResourceLoader.php

index 7a036b8..71b2c59 100644 (file)
@@ -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__ );
        }