Some systems do not have getallheaders()
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 10 Jan 2004 01:28:32 +0000 (01:28 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 10 Jan 2004 01:28:32 +0000 (01:28 +0000)
wiki.phtml

index 962a97e..adcfe63 100644 (file)
@@ -17,13 +17,17 @@ wfProfileIn( "main-misc-setup" );
 OutputPage::setEncodings(); # Not really used yet
 
 # Useful debug output
-wfDebug( "\nStart request\n" );
-wfDebug( "$REQUEST_METHOD $REQUEST_URI\n" );
-$headers = getallheaders();
-foreach ($headers as $name => $value) {
-       wfDebug( "$name: $value\n" );
+if ( function_exists( "getallheaders" ) ) {
+       wfDebug( "\nStart request\n" );
+       wfDebug( "$REQUEST_METHOD $REQUEST_URI\n" );
+       $headers = getallheaders();
+       foreach ($headers as $name => $value) {
+               wfDebug( "$name: $value\n" );
+       }
+       wfDebug( "\n" );
+} else {
+       wfDebug( "$REQUEST_METHOD $REQUEST_URI\n" );
 }
-wfDebug( "\n" );
 
 # Query string fields
 #