r94568 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94567‎ | r94568 | r94569 >
Date:21:04, 15 August 2011
Author:brion
Status:ok
Tags:
Comment:
Revert r94041: PHP Notice: Undefined index: SERVER_PROTOCOL in /home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/Exception.php on line 185

This code appears to be trying to output something like 'HTTP/1.1 500 MediaWiki Error', but using $_SERVER['SERVER_PROTOCOL']. And it seems to output it on things that run in phpunit tests.
Seems pretty broken?
Modified paths:
  • /trunk/phase3/includes/Exception.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Exception.php
@@ -182,25 +182,12 @@
183183
184184 $wgOut->output();
185185 } else {
186 - header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki Error', true, 500 );
187 - header( 'Content-type: text/html; charset=UTF-8' );
188 - header( 'Cache-control: none' );
189 - header( 'Pragma: nocache' );
190 -
191186 $hookResult = $this->runHooks( get_class( $this ) . "Raw" );
192187 if ( $hookResult ) {
193188 die( $hookResult );
194189 }
195190
196 - echo "<html>
197 -<head>
198 -<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
199 -<title>" . $this->getPageTitle() . "</title>
200 -</head>
201 -<body>
202 -";
203191 echo $this->getHTML();
204 - echo "\n</body></html>";
205192 die(1);
206193 }
207194 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94041Readd basic headers and <html>...</html> arround error contents that was remo...ialex12:28, 7 August 2011

Status & tagging log