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

Skip to content

[Mailer] Socket stream: Implict conversion from float 0.1 to int loses precision #53705

Closed
@aleksejs1

Description

@aleksejs1

Symfony version(s) affected

6.4.2

Description

Wrong parameter type for stream_set_timeout() here.

PHP docs
stream_set_timeout(resource $stream, int $seconds, int $microseconds = 0): bool

How to reproduce

Run $mailer->getTransporter()->setTimeout(0.1); with smtp configuration.

Possible Solution

stream_set_timeout($this->stream, (int) $timeout, (int) ((float) $timeout - (int) $timeout) * 1000000);

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