From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/RawPage.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'includes/RawPage.php') diff --git a/includes/RawPage.php b/includes/RawPage.php index 7093367f..b422d49e 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -127,6 +127,15 @@ class RawPage { $url = $_SERVER['PHP_SELF']; } + if( $url == '' ) { + # This will make the next check fail with a confusing error + # message, so we should mention it separately. + wfHttpError( 500, 'Internal Server Error', + "\$_SERVER['PHP_SELF'] is not set. Perhaps you're using CGI" . + " and haven't set cgi.fix_pathinfo = 1 in php.ini?" ); + return; + } + if( strcmp( $wgScript, $url ) ) { # Internet Explorer will ignore the Content-Type header if it # thinks it sees a file extension it recognizes. Make sure that @@ -164,7 +173,7 @@ class RawPage { $text = $this->getRawText(); if( !wfRunHooks( 'RawPageViewBeforeOutput', array( &$this, &$text ) ) ) { - wfDebug( __METHOD__ . ': RawPageViewBeforeOutput hook broke raw page output.' ); + wfDebug( __METHOD__ . ": RawPageViewBeforeOutput hook broke raw page output.\n" ); } echo $text; -- cgit v1.2.3-54-g00ecf