Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit351a2ec

Browse files
bug#59404 [Mailer] Fix SMTP stream EOF handling on Windows by using feof() (skmedix)
This PR was merged into the 6.4 branch.Discussion----------[Mailer] Fix SMTP stream EOF handling on Windows by using feof()| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Issues |Fix#59351| License | MIT<!--Replace this notice by a description of your feature/bugfix.This will help reviewers and should be a good start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (seehttps://symfony.com/bc).-->Full explanation of this change here:#59351 (comment)Help with tests would be appreciated.Commits-------ed18c7c [Mailer] Fix SMTP stream EOF handling on Windows by using feof()
2 parentsa981c26 +ed18c7c commit351a2ec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ public function readLine(): string
8080

8181
$line = @fgets($this->out);
8282
if ('' ===$line ||false ===$line) {
83-
$metas =stream_get_meta_data($this->out);
84-
if ($metas['timed_out']) {
83+
if (stream_get_meta_data($this->out)['timed_out']) {
8584
thrownewTransportException(sprintf('Connection to "%s" timed out.',$this->getReadConnectionDescription()));
8685
}
87-
if ($metas['eof']) {
86+
if (feof($this->out)) {// don't use "eof" metadata, it's not accurate on Windows
8887
thrownewTransportException(sprintf('Connection to "%s" has been closed unexpectedly.',$this->getReadConnectionDescription()));
8988
}
9089
if (false ===$line) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp