Skip to content

Commit

Permalink
Merge pull request #303 from TransbankDevelopers/feat/handle-error-re…
Browse files Browse the repository at this point in the history
…porting

feat: handle error reporting
  • Loading branch information
Matiasnickolas authored Oct 7, 2024
2 parents f1035a3 + 1f807f1 commit 0e022ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Utils/Curl/MessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ public function withAddedHeader($name, $value): static

private function createBody($body = ''): StreamInterface
{
$oldErrorReporting = error_reporting();
error_reporting(0);
$resource = fopen('php://temp', 'rw+');
error_reporting($oldErrorReporting);
if ($resource === false) {
throw new CurlRequestException('Unable to open stream');
}
Expand Down

0 comments on commit 0e022ef

Please sign in to comment.