sveneld commented on code in PR #2942:
URL: https://github.com/apache/thrift/pull/2942#discussion_r1510094826
##########
lib/php/lib/Transport/TSocket.php:
##########
@@ -253,7 +253,9 @@ public function open()
if (function_exists('socket_import_stream') &&
function_exists('socket_set_option')) {
// warnings silenced due to bug
https://bugs.php.net/bug.php?id=70939
$socket = @socket_import_stream($this->handle_);
- @socket_set_option($socket, SOL_TCP, TCP_NODELAY, 1);
+ if ($socket !== false) {
Review Comment:
previous function can return false, and in php 8.0 it trigger a type error,
so i added a check.
In future it will be great to remove all @ and work correctly with all
warning and error generated by stream functions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]