Skip to content
This repository

[2.2][HttpKernel] Remove args from 5.3 stack traces to avoid filling log files #7587

Merged
merged 1 commit into from about 1 year ago

2 participants

Jordi Boggiano Fabien Potencier
Jordi Boggiano
Collaborator

Fixes #7259 - it just makes the PHP 5.3 behavior match the one on 5.4.

Fabien Potencier fabpot referenced this pull request from a commit April 07, 2013
Fabien Potencier merged branch Seldaek/fix-deprecated-logs (PR #7587)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][HttpKernel] Remove args from 5.3 stack traces to avoid filling log files

Fixes #7259 - it just makes the PHP 5.3 behavior match the one on 5.4.

Commits
-------

99256e4 [HttpKernel] Remove args from 5.3 stack traces to avoid filling log files, fixes #7259
bf30a3d
Fabien Potencier fabpot merged commit 99256e4 into from April 07, 2013
Fabien Potencier fabpot closed this April 07, 2013
mmucklo mmucklo referenced this pull request from a commit April 07, 2013
Fabien Potencier merged branch Seldaek/fix-deprecated-logs (PR #7587)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][HttpKernel] Remove args from 5.3 stack traces to avoid filling log files

Fixes #7259 - it just makes the PHP 5.3 behavior match the one on 5.4.

Commits
-------

99256e4 [HttpKernel] Remove args from 5.3 stack traces to avoid filling log files, fixes #7259
674d72b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 07, 2013
Jordi Boggiano [HttpKernel] Remove args from 5.3 stack traces to avoid filling log f…
…iles, fixes #7259
99256e4
This page is out of date. Refresh to see the latest.
12  src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
@@ -87,7 +87,17 @@ public function handle($level, $message, $file, $line, $context)
87 87
 
88 88
         if ($level & (E_USER_DEPRECATED | E_DEPRECATED)) {
89 89
             if (null !== self::$logger) {
90  
-                $stack = version_compare(PHP_VERSION, '5.4', '<') ? array_slice(debug_backtrace(false), 0, 10) : debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
  90
+                if (version_compare(PHP_VERSION, '5.4', '<')) {
  91
+                    $stack = array_map(
  92
+                        function ($row) {
  93
+                            unset($row['args']);
  94
+                            return $row;
  95
+                        },
  96
+                        array_slice(debug_backtrace(false), 0, 10)
  97
+                    );
  98
+                } else {
  99
+                    $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
  100
+                }
91 101
 
92 102
                 self::$logger->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack));
93 103
             }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.