Преглед на файлове

Remove constant from constructor

Jordi Boggiano преди 8 години
родител
ревизия
1b660bbbee
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/Monolog/Formatter/GelfMessageFormatter.php

+ 2 - 2
src/Monolog/Formatter/GelfMessageFormatter.php

@@ -58,7 +58,7 @@ class GelfMessageFormatter extends NormalizerFormatter
         Logger::EMERGENCY => 0,
     );
 
-    public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = self::DEFAULT_MAX_LENGTH)
+    public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = null)
     {
         parent::__construct('U.u');
 
@@ -66,7 +66,7 @@ class GelfMessageFormatter extends NormalizerFormatter
 
         $this->extraPrefix = $extraPrefix;
         $this->contextPrefix = $contextPrefix;
-        $this->maxLength = $maxLength;
+        $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength;
     }
 
     /**