Merge "Move section ID fallbacks into headers themselves"
[lhc/web/wiklou.git] / includes / debug / logger / LegacyLogger.php
index 4614c46..06ec574 100644 (file)
@@ -43,8 +43,7 @@ use UDPTransport;
  *
  * @see \MediaWiki\Logger\LoggerFactory
  * @since 1.25
- * @author Bryan Davis <bd808@wikimedia.org>
- * @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,14 +454,14 @@ 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 );