Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpKernel] Avoid unsuppressed include #36473

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

Conversation

PatchRanger
Copy link
Contributor

@PatchRanger PatchRanger commented Apr 17, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #36472
License MIT
Doc PR no

Fixed the bug by introducing includeSafe, which incorporates the trick about suppressing include-warning.
It has several benefits:

@PatchRanger PatchRanger force-pushed the bugfix-36472-avoid_unsupressed_include branch from f156e03 to 6db274e Compare April 17, 2020 06:45
@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Apr 18, 2020
@nicolas-grekas nicolas-grekas changed the title Fix #36472: Avoid unsuppressed include [HttpKernel] Avoid unsuppressed include Apr 18, 2020
@nicolas-grekas
Copy link
Member

I'm not sure why this makes any difference: does it fix your case? To me, the call to error_reporting(E_ALL ^ E_WARNING) is still in effect when the second include runs. I don't see how this change would change any behavior, what do I miss?

Did you have a look at the error handler in Sentry? If it ignores the current error_reporting() level, the issue is there, not in the Kernel class, isn't it?

@PatchRanger
Copy link
Contributor Author

@nicolas-grekas I've checked: this change alone does not fix my issue. You got the point correctly: the root of the issue is in the way how Sentry handles error_reporting (I've mentioned the PR, so the issues are cross-linked. I've even created a PR for that Sentry issue, so the cure is on the way)) ). I've left the PR open up to your decision, just in case if you feel good about my point of encapsulating the trick into the separate method, which tweaks error_reporting strictly around includes, minimizing possible side-effect of such workaround. In case if not - I wouldn't mind you close the PR and the issue itself.
Anyway thank you for your time, I appreciate your questions, which make me think into the correct direction.

@nicolas-grekas
Copy link
Member

Thanks, I'm going to close then, since the code has no bug and we prefer not changing it when it works as expected.

@PatchRanger PatchRanger deleted the bugfix-36472-avoid_unsupressed_include branch April 20, 2020 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants