Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / includes / exception / MWExceptionHandler.php
index f3d61f0..205ec77 100644 (file)
@@ -121,7 +121,7 @@ class MWExceptionHandler {
                self::handleException( $e );
 
                // Make sure we don't claim success on exit for CLI scripts (T177414)
-               if ( PHP_SAPI === 'cli' ) {
+               if ( wfIsCLI() ) {
                        register_shutdown_function(
                                function () {
                                        exit( 255 );
@@ -300,7 +300,7 @@ TXT;
                $logger = LoggerFactory::getInstance( 'fatal' );
                $logger->error( $msg, [
                        'fatal_exception' => [
-                               'class' => 'ErrorException',
+                               'class' => ErrorException::class,
                                'message' => "PHP Fatal Error: {$message}",
                                'code' => $level,
                                'file' => $file,