Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit add901a

Browse files
committed
Correct signature of error handlers
1 parent 7fa00c5 commit add901a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Http/Client/StreamClient.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ public function sendRequest(RequestInterface $request): ResponseInterface
3030

3131
// Register temporary error handler to catch fopen warnings.
3232
$err = [];
33-
set_error_handler(function (int $code, string $message) use (&$err): void {
33+
set_error_handler(function (int $code, string $message) use (&$err): bool {
3434
$err['code'] = $code;
3535
$err['message'] = $message;
36+
return true;
3637
});
3738

3839
// Open the file and restore the error handler.

src/Http/Factory/StreamFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ public function createStreamFromFile(string $filename, string $mode = 'r'): Stre
4444
{
4545
// Register temporary error handler to catch fopen warnings.
4646
$err = [];
47-
set_error_handler(function (int $code, string $message) use (&$err): void {
47+
set_error_handler(function (int $code, string $message) use (&$err): bool {
4848
$err['code'] = $code;
4949
$err['message'] = $message;
50+
return true;
5051
});
5152

5253
// Open the file and restore the error handler.

0 commit comments

Comments
 (0)