Skip to content

Commit

Permalink
🚿
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Aug 4, 2024
1 parent 77d1d76 commit d6effe5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/HTTPFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public static function createStreamFromSource(mixed $source = null):StreamInterf

if($type === 'resource'){
// avoid using php://input and copy over the contents to a new stream
if(stream_get_meta_data($source)['uri'] === 'php://input'){
/** @phpstan-ignore-next-line */
if((stream_get_meta_data($source)['uri'] ?? '') === 'php://input'){

Check failure on line 125 in src/HTTPFactory.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (8.1)

No error to ignore is reported on line 125.

Check failure on line 125 in src/HTTPFactory.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (8.2)

No error to ignore is reported on line 125.
$stream = StreamUtil::tryFopen('php://temp', 'r+');

stream_copy_to_stream($source, $stream);
Expand Down

0 comments on commit d6effe5

Please sign in to comment.