dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a57d86
)
MWExceptionHandler: Fix PHP7 compatibility
author
Kunal Mehta
<legoktm@member.fsf.org>
Tue, 12 Jul 2016 22:10:25 +0000
(15:10 -0700)
committer
Kunal 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
patch
|
blob
|
history
diff --git
a/includes/exception/MWExceptionHandler.php
b/includes/exception/MWExceptionHandler.php
index
e4ff5f3
..
7d8b244
100644
(file)
--- a/
includes/exception/MWExceptionHandler.php
+++ b/
includes/exception/MWExceptionHandler.php
@@
-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 . '] '