Skip to content

Commit 74b4173

Browse files
committed
Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls
1 parent 13aa695 commit 74b4173

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Server/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function write(Data $data): bool
6262
$context = array_filter($context);
6363
$encodedPayload = base64_encode(serialize([$data, $context]))."\n";
6464

65-
set_error_handler(fn () => true);
65+
set_error_handler(static fn () => null);
6666
try {
6767
if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) {
6868
return true;
@@ -87,7 +87,7 @@ public function write(Data $data): bool
8787
*/
8888
private function createSocket()
8989
{
90-
set_error_handler(fn () => true);
90+
set_error_handler(static fn () => null);
9191
try {
9292
return stream_socket_client($this->host, $errno, $errstr, 3) ?: null;
9393
} finally {

0 commit comments

Comments
 (0)