Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit ff219ca

Browse files
committed
Remove usage of the second argument of set_error_handler to fix PHP bug #63206
1 parent 1676072 commit ff219ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Stream.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,12 @@ private function setStream($stream, $mode = 'r')
330330

331331
if (is_string($stream)) {
332332
set_error_handler(function ($e) use (&$error) {
333+
if ($e !== E_WARNING) {
334+
return;
335+
}
336+
333337
$error = $e;
334-
}, E_WARNING);
338+
});
335339
$resource = fopen($stream, $mode);
336340
restore_error_handler();
337341
}

0 commit comments

Comments
 (0)