exception: Correct label "Notice" for E_USER_NOTICE, not "Warning"
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 12 Oct 2018 04:05:16 +0000 (05:05 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 12 Oct 2018 04:05:16 +0000 (05:05 +0100)
Follows-up ef06b528d9, which fixed the severity of all PHP errors
to have severity "Warning" or higher.

However, it also accidentally changed the label of "Notice"
to "Warning", which is confusing and incorrect.

Change-Id: Iffd39aa23b7f2cbff5cdaf876b8d4d595dcd6f96

includes/exception/MWExceptionHandler.php

index 0e81a43..951498e 100644 (file)
@@ -225,8 +225,12 @@ class MWExceptionHandler {
                                $levelName = 'Notice';
                                $severity = LogLevel::ERROR;
                                break;
-                       case E_USER_WARNING:
                        case E_USER_NOTICE:
+                               // Used by wfWarn(), MWDebug::warning()
+                               $levelName = 'Notice';
+                               $severity = LogLevel::WARNING;
+                               break;
+                       case E_USER_WARNING:
                                // Used by wfWarn(), MWDebug::warning()
                                $levelName = 'Warning';
                                $severity = LogLevel::WARNING;