Add some logging for weird redirected POSTs
[lhc/web/wiklou.git] / includes / Exception.php
index 855eb09..dc1208a 100644 (file)
@@ -333,7 +333,7 @@ class ErrorPageError extends MWException {
                // customized by the local wiki. So get the default English version for
                // passing to the parent constructor. Our overridden report() below
                // makes sure that the page shown to the user is not forced to English.
-               if( $msg instanceof Message ) {
+               if ( $msg instanceof Message ) {
                        $enMsg = clone( $msg );
                } else {
                        $enMsg = wfMessage( $msg, $params );
@@ -587,7 +587,7 @@ class HttpError extends MWException {
                        $content = htmlspecialchars( $this->content );
                }
 
-               return "<!DOCTYPE html>\n".
+               return "<!DOCTYPE html>\n" .
                        "<html><head><title>$header</title></head>\n" .
                        "<body><h1>$header</h1><p>$content</p></body></html>\n";
        }
@@ -668,7 +668,7 @@ class MWExceptionHandler {
                if ( defined( 'STDERR' ) ) {
                        fwrite( STDERR, $message );
                } else {
-                       echo( $message );
+                       echo $message;
                }
        }
 
@@ -691,8 +691,10 @@ class MWExceptionHandler {
                // Final cleanup
                if ( $wgFullyInitialised ) {
                        try {
-                               wfLogProfilingData(); // uses $wgRequest, hence the $wgFullyInitialised condition
-                       } catch ( Exception $e ) {}
+                               // uses $wgRequest, hence the $wgFullyInitialised condition
+                               wfLogProfilingData();
+                       } catch ( Exception $e ) {
+                       }
                }
 
                // Exit value should be nonzero for the benefit of shell jobs