X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdebug%2Flogger%2FLegacyLogger.php;h=baf4637e835d968dc650333fcaf8a3b23754a92c;hb=39f0f919c5708f4c672a8eb7e0891f50bf16883e;hp=4614c46b6d27af03b4d6e4f2427005862481aaff;hpb=fd88074bbf78e7113dee6eec627c858f3c4fc01d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/debug/logger/LegacyLogger.php b/includes/debug/logger/LegacyLogger.php index 4614c46b6d..7bd505d089 100644 --- a/includes/debug/logger/LegacyLogger.php +++ b/includes/debug/logger/LegacyLogger.php @@ -43,8 +43,7 @@ use UDPTransport; * * @see \MediaWiki\Logger\LoggerFactory * @since 1.25 - * @author Bryan Davis - * @copyright © 2014 Bryan Davis and Wikimedia Foundation. + * @copyright © 2014 Wikimedia Foundation and contributors */ class LegacyLogger extends AbstractLogger { @@ -378,7 +377,7 @@ class LegacyLogger extends AbstractLogger { if ( is_nan( $item ) ) { return 'NaN'; } - return $item; + return (string)$item; } if ( is_scalar( $item ) ) { @@ -455,20 +454,20 @@ class LegacyLogger extends AbstractLogger { } /** - * Log to a file without getting "file size exceeded" signals. - * - * Can also log to UDP with the syntax udp://host:port/prefix. This will send - * lines to the specified port, prefixed by the specified prefix and a space. - * - * @param string $text - * @param string $file Filename - */ + * Log to a file without getting "file size exceeded" signals. + * + * Can also log to UDP with the syntax udp://host:port/prefix. This will send + * lines to the specified port, prefixed by the specified prefix and a space. + * + * @param string $text + * @param string $file Filename + */ public static function emit( $text, $file ) { if ( substr( $file, 0, 4 ) == 'udp:' ) { $transport = UDPTransport::newFromString( $file ); $transport->emit( $text ); } else { - \MediaWiki\suppressWarnings(); + \Wikimedia\suppressWarnings(); $exists = file_exists( $file ); $size = $exists ? filesize( $file ) : false; if ( !$exists || @@ -476,7 +475,7 @@ class LegacyLogger extends AbstractLogger { ) { file_put_contents( $file, $text, FILE_APPEND ); } - \MediaWiki\restoreWarnings(); + \Wikimedia\restoreWarnings(); } }