Skip to content

Commit dc22a28

Browse files
bug #45675 [Runtime] Fix passing $debug parameter to ErrorHandler (Kocal)
This PR was merged into the 5.4 branch. Discussion ---------- [Runtime] Fix passing $debug parameter to `ErrorHandler` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> As discussed with `@nicolas`-grekas on Slack, we think we should pass `$debug` parameter instead of `true`, since the 2nd argument of [`ErrorHandler`](https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/ErrorHandler/ErrorHandler.php#L184) is called `$debug`. Commits ------- a39f4f31e2 [Runtime] Fix passing $debug parameter to `ErrorHandler`
2 parents 06fdd94 + b67af59 commit dc22a28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Internal/SymfonyErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static function register(bool $debug): void
2929
if (class_exists(ErrorHandler::class)) {
3030
DebugClassLoader::enable();
3131
restore_error_handler();
32-
ErrorHandler::register(new ErrorHandler(new BufferingLogger(), true));
32+
ErrorHandler::register(new ErrorHandler(new BufferingLogger(), $debug));
3333
}
3434
}
3535
}

0 commit comments

Comments
 (0)