MWExceptionHandler: Fix PHP7 compatibility
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 12 Jul 2016 22:10:25 +0000 (15:10 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 12 Jul 2016 22:10:25 +0000 (15:10 -0700)
The `Exception` type-hint will cause issues if a PHP7 `Error` is thrown.

Change-Id: Iab0af90235badd57304131ae2274a1cfa0be822a

includes/exception/MWExceptionHandler.php

index e4ff5f3..7d8b244 100644 (file)
@@ -488,7 +488,11 @@ TXT;
                return "[$id] $url   $type from line $line of $file: $message";
        }
 
-       public static function getPublicLogMessage( Exception $e ) {
+       /**
+        * @param Exception|Throwable $e
+        * @return string
+        */
+       public static function getPublicLogMessage( $e ) {
                $reqId = WebRequest::getRequestId();
                $type = get_class( $e );
                return '[' . $reqId . '] '