r74964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74963‎ | r74964 | r74965 >
Date:20:16, 18 October 2010
Author:catrope
Status:ok (Comments)
Tags:
Comment:
ResourceLoader: Clear warnings before echo'ing output
Modified paths:
  • /trunk/phase3/includes/ResourceLoader.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ResourceLoader.php
@@ -300,7 +300,10 @@
301301 return;
302302 }
303303
304 - echo $this->makeModuleResponse( $context, $modules, $missing );
 304+ $response = $this->makeModuleResponse( $context, $modules, $missing );
 305+ // Clear any warnings from the buffer
 306+ ob_clean();
 307+ echo $response;
305308
306309 wfProfileOut( __METHOD__ );
307310 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r75018Improves on r74964 by including PHP warnings emitted during a ResourceLoader ...tparscal17:48, 19 October 2010

Comments

#Comment by Trevor Parscal (WMF) (talk | contribs)   22:14, 18 October 2010

This is cool - but sometimes those warnings are wanted. How about in debug mode we append the response with the warnings which are inside of a /* comment */ ?

#Comment by Catrope (talk | contribs)   15:36, 19 October 2010

That's fine. I just wanted to not have it break stuff.

Status & tagging log