Prechádzať zdrojové kódy

Replace array functions with simple string concatenation

Arnas L 11 rokov pred
rodič
commit
86c53e2ce1
1 zmenil súbory, kde vykonal 1 pridanie a 3 odobranie
  1. 1 3
      src/Monolog/Handler/LogglyHandler.php

+ 1 - 3
src/Monolog/Handler/LogglyHandler.php

@@ -48,9 +48,7 @@ class LogglyHandler extends AbstractProcessingHandler
 
     public function addTag($tag)
     {
-        $tags = (strlen($this->tag) > 0) ? explode(',', $this->tag) : array();
-        $tags[] = $tag;
-        $this->tag = implode(',', $tags);
+        $this->tag = (strlen($this->tag) > 0) ? $this->tag .','. $tag : $tag;
     }
 
     protected function write(array $record)