8000 [HttpKernel] Only remove `E_WARNING` from error level during kernel init by fritzmg · Pull Request #59975 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] Only remove E_WARNING from error level during kernel init #59975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Only remove E_WARNING from error level
  • Loading branch information
fritzmg committed Mar 14, 2025
commit 89818d9cf505de6855abaa8a8f305ae18c073b2e
3 changes: 2 additions & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ protected function initializeContainer()
$cachePath = $cache->getPath();

// Silence E_WARNING to ignore "include" failures - don't use "@" to prevent silencing fatal errors
$errorLevel = error_reporting(\E_ALL ^ \E_WARNING);
$errorLevel = error_reporting();
error_reporting($errorLevel & ~\E_WARNING);

try {
if (is_file($cachePath) && \is_object($this->container = include $cachePath)
Expand Down
Loading
0