X-Git-Url: https://git.heureux-cyclage.org/index.php?a=blobdiff_plain;f=includes%2Fexception%2FMWExceptionHandler.php;h=d863a2bb583c2b9cc6417b6971eb249375be6b6f;hb=251a0b97e5bb8711bac1784e90f9b7d61377e7da;hp=9b591918d41634f4f0e80649b2bb79961ecf0215;hpb=23673a0ff99f4173ded689ee32dae799f2d07642;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/MWExceptionHandler.php b/includes/exception/MWExceptionHandler.php index 9b591918d4..d863a2bb58 100644 --- a/includes/exception/MWExceptionHandler.php +++ b/includes/exception/MWExceptionHandler.php @@ -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 ); @@ -279,7 +279,7 @@ class MWExceptionHandler { // HHVM: Class undefined: foo // PHP5: Class 'foo' not found if ( preg_match( "/Class (undefined: \w+|'\w+' not found)/", $msg ) ) { - // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong + // phpcs:disable Generic.Files.LineLength $msg = <<mediawiki.org for help on installing the required components. TXT; - // @codingStandardsIgnoreEnd + // phpcs:enable } // We can't just create an exception and log it as it is likely that