X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexception%2FMWException.php;h=b3e9422b8d32238ddb9d3956c59c02e1ada735a8;hb=52b74d44d522c2a1b67f9ccc2b8f7e44b6b52d7c;hp=6d95919a87cbf0ecd52b15a0edcdba952cca9218;hpb=587d08c5a626f8195def9f82ee83e17c85824db8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/MWException.php b/includes/exception/MWException.php index 6d95919a87..b3e9422b8d 100644 --- a/includes/exception/MWException.php +++ b/includes/exception/MWException.php @@ -55,7 +55,7 @@ class MWException extends Exception { global $wgLang; foreach ( $this->getTrace() as $frame ) { - if ( isset( $frame['class'] ) && $frame['class'] === 'LocalisationCache' ) { + if ( isset( $frame['class'] ) && $frame['class'] === LocalisationCache::class ) { return false; } } @@ -189,7 +189,7 @@ class MWException extends Exception { } elseif ( self::isCommandLine() ) { $message = $this->getText(); // T17602: STDERR may not be available - if ( defined( 'STDERR' ) ) { + if ( !defined( 'MW_PHPUNIT_TEST' ) && defined( 'STDERR' ) ) { fwrite( STDERR, $message ); } else { echo $message;