-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] LoggerDataCollector crashes on empty deprecation.log #31050
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
Labels
Comments
Could you please send a PR fixing the issue? |
@nicolas-grekas Sure, what'd be your preferred solution? And what should be done if the check fails? Just silently do nothing? |
Ignoring silently looks fine to me. |
Making the fabbot happy takes longer than @nicolas-grekas to review the change. 😁 |
nicolas-grekas
pushed a commit
to althaus/symfony
that referenced
this issue
Apr 11, 2019
nicolas-grekas
added a commit
that referenced
this issue
Apr 11, 2019
…ile (althaus) This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #31076). Discussion ---------- [HttpKernel] Fixed LoggerDataCollector crashing on empty file | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31050 | License | MIT This PR adds a check to the LoggerDataCollector if there's acutal some content in the log file. Commits ------- 291c73a Catch empty deprecation.log silently (fixes #31050)
nicolas-grekas
added a commit
that referenced
this issue
Apr 11, 2019
* 3.4: Catch empty deprecation.log silently (fixes #31050)
nicolas-grekas
added a commit
that referenced
this issue
Apr 11, 2019
* 4.2: Catch empty deprecation.log silently (fixes #31050) minor: the meaning of the data breach was not correct Optimize SVGs property normalizer should also pass format and context to isAllowedAttribute
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.2.x
Description
We encountered an issue with the
LoggerDataCollector
resulting in an error. We simply had an empty (aka zero bytes) deprecation.log file.The reason is the direct unserialization of the file's content. There's just a check if the file exists:
symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php
Line 134 in 5aa0967
How to reproduce
Touching
deprecation.log
in you log directory should be enough to enforce this.Possible Solution
Extend the check if the file is not empty or the unserialized content is iterable?
Cheers
Matthias
The text was updated successfully, but these errors were encountered: