Skip to content

Commit c5b547b

Browse files
authored
Merge pull request #463 from SiebelsTim/fix-reading-entire-body-into-ram
Fixed reading in the entire request into RAM
2 parents 8823361 + ea89a18 commit c5b547b

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,6 @@ parameters:
160160
count: 1
161161
path: src/Utils.php
162162

163-
-
164-
message: "#^Parameter \\#2 \\$str of function fwrite expects string, string\\|false given\\.$#"
165-
count: 1
166-
path: src/Utils.php
167-
168163
-
169164
message: "#^Variable \\$handle might not be defined\\.$#"
170165
count: 1

src/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public static function streamFor($resource = '', array $options = []): StreamInt
304304
/** @var resource $resource */
305305
if ((\stream_get_meta_data($resource)['uri'] ?? '') === 'php://input') {
306306
$stream = self::tryFopen('php://temp', 'w+');
307-
fwrite($stream, stream_get_contents($resource));
307+
stream_copy_to_stream($resource, $stream);
308308
fseek($stream, 0);
309309
$resource = $stream;
310310
}

0 commit comments

Comments
 (0)