8000 Type Error | FileProfilerStorage->createProfileFromData · Issue #45606 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

Type Error | FileProfilerStorage->createProfileFromData #45606

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

Closed
andimg93 opened this issue Mar 1, 2022 · 0 comments
Closed

Type Error | FileProfilerStorage->createProfileFromData #45606

andimg93 opened this issue Mar 1, 2022 · 0 comments

Comments

@andimg93
Copy link
andimg93 commented Mar 1, 2022

Symfony version(s) affected

6.0.5

Description

I use Symfony version 6.0.5 and noticed several type errors in my log files regarding the FileProfilerStorage class, here is one of the log messages:
request.CRITICAL: Uncaught PHP Exception TypeError: "Symfony\Component\HttpKernel\Profiler\FileProfilerStorage::createProfileFromData(): Argument #2 ($data) must be of type array, bool given, called in .../vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php on line 124" at .../vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php line 263 {"exception":"[object] (TypeError(code: 0): Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage::createProfileFromData(): Argument #2 ($data) must be of type array, bool given, called in .../vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php on line 124 at .../vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php:263)"} []

How to reproduce

I would wish to give more info, but clicking based on the name of the class around the profile actions and handling I did not notice when it is exactly happen. I guess it would be good to just check the code based on transmitted parameters - so when is it possible that argument two can be transmitted as bool while an array would be the expected type.

Possible Solution

No response

Additional Context

No response

@andimg93 andimg93 added the Bug label Mar 1, 2022
nicolas-grekas added a commit that referenced this issue Mar 2, 2022
This PR was merged into the 4.4 branch.

Discussion
-
5D12
---------

[HttpKernel] Guard against bad profile data

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

Commits
-------

f4a2089 [HttpKernel] Guard against bad profile data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0