Browse Source

Remove preg_replace to hopefully fix segfault on long inputs, fixes #376

Jordi Boggiano 11 years ago
parent
commit
43ca6dc06b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Monolog/Formatter/LineFormatter.php

+ 1 - 1
src/Monolog/Formatter/LineFormatter.php

@@ -125,6 +125,6 @@ class LineFormatter extends NormalizerFormatter
             return $str;
             return $str;
         }
         }
 
 
-        return preg_replace('{[\r\n]+}', ' ', $str);
+        return strtr($str, array("\r\n" => ' ', "\r" => ' ', "\n" => ' '));
     }
     }
 }
 }