2
0
Эх сурвалжийг харах

fix normalizing exception trace

The trace does not include the file / line at which the exception is thrown
Gábor Tóth 12 жил өмнө
parent
commit
3a811ecfda

+ 0 - 1
src/Monolog/Formatter/NormalizerFormatter.php

@@ -101,7 +101,6 @@ class NormalizerFormatter implements FormatterInterface
         );
 
         $trace = $e->getTrace();
-        array_shift($trace);
         foreach ($trace as $frame) {
             if (isset($frame['file'])) {
                 $data['trace'][] = $frame['file'].':'.$frame['line'];

+ 0 - 1
tests/Monolog/Formatter/ScalarFormatterTest.php

@@ -12,7 +12,6 @@ class ScalarFormatterTest extends \PHPUnit_Framework_TestCase
     {
         $data = array();
         $trace = $e->getTrace();
-        array_shift($trace);
         foreach ($trace as $frame) {
             if (isset($frame['file'])) {
                 $data[] = $frame['file'].':'.$frame['line'];