Skip to content

Type Error | FileProfilerStorage->createProfileFromData #45606

Closed
@andimg93

Description

@andimg93

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions