r113348 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113347‎ | r113348 | r113349 >
Date:06:52, 8 March 2012
Author:tstarling
Status:ok
Tags:
Comment:
Fix for bug 34663 -- use 500 status code for errors. Also use an appropriate exit status for command line scripts.
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php
@@ -337,6 +337,8 @@
338338 if ( php_sapi_name() !== 'cli' ) {
339339 $msg = htmlspecialchars( $msg );
340340 }
341 - die( $msg );
 341+ header( 'HTTP/1.1 500 Internal server error' );
 342+ echo $msg;
 343+ exit( 1 );
342344 }
343345 }

Status & tagging log