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

Commit

Permalink
Merge ff219ca into 1676072
Browse files Browse the repository at this point in the history
  • Loading branch information
ste93cry committed Jul 9, 2018
2 parents 1676072 + ff219ca commit e321d83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,12 @@ private function setStream($stream, $mode = 'r')

if (is_string($stream)) {
set_error_handler(function ($e) use (&$error) {
if ($e !== E_WARNING) {
return;
}

$error = $e;
}, E_WARNING);
});
$resource = fopen($stream, $mode);
restore_error_handler();
}
Expand Down

0 comments on commit e321d83

Please sign in to comment.