Skip to content

Method base64Encode missing in Symfony\Component\Mailer\DataCollector\MessageDataCollector #44127

Closed
@Xesau

Description

@Xesau

Symfony version(s) affected

5.4.0-BETA2

Description

When opening the Emails tab in the Profiler and you have sent at least 1 email, the following error pops up:

Neither the property "base64Encode" nor one of the methods "base64Encode()", "getbase64Encode()"/"isbase64Encode()"/"hasbase64Encode()" or "__call()" exist and have public access in class "Symfony\Component\Mailer\DataCollector\MessageDataCollector".

How to reproduce

  1. Send one email with an HTML body using Symfony Mailer
  2. Open the Emails tab in the Profiler for the appropriate Request

Possible Solution

Add the following code to src/Symfony/Component/Mailer/DataCollector/MessageDataCollector.php:

    public function base64Encode(string $body)
    {
        return base64_encode($body);
    }

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