Skip to content

Commit 9b0165e

Browse files
Merge branch '3.4' into 4.1
* 3.4: Fix CS Allow reuse of Session between requests [MonologBridge] Re-add option option to ignore empty context and extra data [Lock] remove useless code [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file Provide debug_backtrace with proper args [DI] fix infinite loop involving self-references in decorated services forward false label option to nested types forward the invalid_message option in date types
2 parents 8f8fa92 + 4f2bbc1 commit 9b0165e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

DeprecationErrorHandler.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ public static function register($mode = 0)
5454
if (false === $mode) {
5555
$mode = getenv('SYMFONY_DEPRECATIONS_HELPER');
5656
}
57-
if (DeprecationErrorHandler::MODE_WEAK !== $mode && DeprecationErrorHandler::MODE_WEAK_VENDORS !== $mode && (!isset($mode[0]) || '/' !== $mode[0])) {
57+
if (DeprecationErrorHandler::MODE_DISABLED !== $mode
58+
&& DeprecationErrorHandler::MODE_WEAK !== $mode
59+
&& DeprecationErrorHandler::MODE_WEAK_VENDORS !== $mode
60+
&& (!isset($mode[0]) || '/' !== $mode[0])
61+
) {
5862
$mode = preg_match('/^[1-9][0-9]*$/', $mode) ? (int) $mode : 0;
5963
}
6064

@@ -108,7 +112,7 @@ public static function register($mode = 0)
108112
return $ErrorHandler::handleError($type, $msg, $file, $line, $context);
109113
}
110114

111-
$trace = debug_backtrace(true);
115+
$trace = debug_backtrace();
112116
$group = 'other';
113117
$isVendor = DeprecationErrorHandler::MODE_WEAK_VENDORS === $mode && $inVendors($file);
114118

0 commit comments

Comments
 (0)