clue · GitHub

The previous code works just fine on PHP 7 and older. PHP 8 adds
stricter type checks for closed socket resources, so the underlying
function now throws a `TypeError`. This can be avoided by first checking
if the socket resource is still valid (not closed). This works across
all PHP versions and also helps with avoiding some uneeded error
suppression operators.

@clue

jsor

jsor approved these changes Aug 24, 2020

WyriHaximus

@WyriHaximus

@clue

clue deleted the php8-closed branch

August 25, 2020 06:42

@clue clue mentioned this pull request

Aug 31, 2020

Merged

clue added a commit to clue-labs/datagram that referenced this pull request

Feb 2, 2021

@clue clue mentioned this pull request

Feb 2, 2021

Merged

clue added a commit to clue-labs/datagram that referenced this pull request

Feb 2, 2021

Read the original on github.com ↗