r106500 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106499‎ | r106500 | r106501 >
Date:05:02, 17 December 2011
Author:aaron
Status:ok
Tags:
Comment:
FU r98698: Show any PHP warnings in tryRespondFromFileCache() in debug mode
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoader.php
@@ -573,6 +573,11 @@
574574 return false; // output handled (buffers cleared)
575575 }
576576 $response = $fileCache->fetchText();
 577+ // Capture any PHP warnings from the output buffer and append them to the
 578+ // response in a comment if we're in debug mode.
 579+ if ( $context->getDebug() && strlen( $warnings = ob_get_contents() ) ) {
 580+ $response = "/*\n$warnings\n*/\n" . $response;
 581+ }
577582 // Remove the output buffer and output the response
578583 ob_end_clean();
579584 echo $response . "\n/* Cached {$ts} */";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98698FileCache:...aaron17:53, 2 October 2011

Status & tagging log