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

Skip to content

Conversation

christianseel
Copy link
Contributor

@christianseel christianseel commented Aug 13, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Related: PHPMailer/PHPMailer#3183
License MIT

We've been facing an issue with PHPMailer (PHPMailer/PHPMailer#3183) where stream_select() returns false, but because our application uses setlocale(LC_ALL, 'de_DE.UTF-8'), the PHP warning does NOT contain the string 'interrupted system call' which results in unexpected behavior (no retry happening).

We did found a fix for this: PHPMailer/PHPMailer#3193

I received a great hint by @teefax – who pointed out that the stream_select(): Unable to select part of the php warning message is not translated for other locales. Only the interrupted system call part is translated.

That Unable to select is followed by an error number in square brackets. However that number can be different based on the operating system of the server. But PHP has a constant SOCKET_EINTR for that.

So the recommendation is to check for the SOCKET_EINTR constant which is defined under Windows and UNIX-like platforms (if available on the platform) and use that with the other english warning text to catch those interrupted system calls for non-english locale applications.

I left the existing check to avoid any potential unknown breaking change and extended the if-condition.

As I known Symfony was using a similar approach, I'm recommending to apply this enhancement to the "interrupted check" as well.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title Enhance hasSystemCallBeenInterrupted function for non-english locale Enhance hasSystemCallBeenInterrupted function for non-english locale Aug 13, 2025
@carsonbot carsonbot changed the title Enhance hasSystemCallBeenInterrupted function for non-english locale [Process] Enhance hasSystemCallBeenInterrupted function for non-english locale Aug 13, 2025
@christianseel
Copy link
Contributor Author

Deprecation and Feature labels have been added incorrectly because of a mistake in the first PR description version. I updated the description, but someone needs to remove the labels please. (sorry!)

@OskarStark
Copy link
Contributor

OskarStark commented Aug 14, 2025

Removed the labels, no problem 😉

@nicolas-grekas
Copy link
Member

Thank you @christianseel.

@nicolas-grekas nicolas-grekas merged commit b0687c9 into symfony:6.4 Aug 14, 2025
2 checks passed
This was referenced Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants