Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket_select accepts only integers #56

Closed
szepeviktor opened this issue Nov 7, 2020 · 6 comments · Fixed by #63
Closed

socket_select accepts only integers #56

szepeviktor opened this issue Nov 7, 2020 · 6 comments · Fixed by #63
Milestone

Comments

@szepeviktor
Copy link
Contributor

https://www.php.net/manual/en/function.fmod

        $usec = $sec === null ? null : fmod($sec, 1) * 1e6;

        $ret = @socket_select($r, $w, $e, (int)$sec, (int)$usec);

What do you think about this?

@clue clue added the easy pick label Nov 27, 2020
@clue clue added this to the v1.5.0 milestone Nov 27, 2020
@clue
Copy link
Owner

clue commented Nov 27, 2020

@szepeviktor Thanks for spotting 👍

@clue clue closed this as completed in #63 Nov 27, 2020
@szepeviktor
Copy link
Contributor Author

You're welcome.
BTW it was @phpstan.

@clue
Copy link
Owner

clue commented Nov 27, 2020

https://phpstan.org/r/47de8c45-8636-46d7-8d08-3011f9bbc554 Looks like a minor bug in @phpstan by the way, both timeout arguments also support null values. Feel like filing an upstream PR? 👍

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Nov 27, 2020

@clue
Copy link
Owner

clue commented Nov 27, 2020

Go for it 👍

@szepeviktor
Copy link
Contributor Author

🏋️‍♂️ Done.
phpstan/phpstan-src#385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants