Skip to content

Commit f7b4ac8

Browse files
minor #51096 Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls (lyrixx)
This PR was merged into the 6.4 branch. Discussion ---------- Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- be1bbbccc1 Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls
2 parents 8179419 + 74b4173 commit f7b4ac8

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)