summaryrefslogtreecommitdiff
path: root/includes/RawPage.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/RawPage.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'includes/RawPage.php')
-rw-r--r--includes/RawPage.php11
1 files changed, 10 insertions, 1 deletions
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;