Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@Seldaek

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

@fabpot fabpot referenced this pull request from a commit
@fabpot fabpot 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
@fabpot fabpot merged commit 99256e4 into symfony:2.2
@mmucklo mmucklo referenced this pull request from a commit
@fabpot fabpot 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
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
View
12 src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
@@ -87,7 +87,17 @@ public function handle($level, $message, $file, $line, $context)
if ($level & (E_USER_DEPRECATED | E_DEPRECATED)) {
if (null !== self::$logger) {
- $stack = version_compare(PHP_VERSION, '5.4', '<') ? array_slice(debug_backtrace(false), 0, 10) : debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
+ if (version_compare(PHP_VERSION, '5.4', '<')) {
+ $stack = array_map(
+ function ($row) {
+ unset($row['args']);
+ return $row;
+ },
+ array_slice(debug_backtrace(false), 0, 10)
+ );
+ } else {
+ $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
+ }
self::$logger->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack));
}
Something went wrong with that request. Please try again.