@@ -151,6 +151,10 @@ |
||
151 | 151 | return $post ?: []; |
152 | 152 | } |
153 | 153 | |
154 | + /** |
|
155 | + * @param resource $stream |
|
156 | + * @param string $boundary |
|
157 | + */ |
|
154 | 158 | private function parseMultipartFormData($stream, $boundary) { |
155 | 159 | $post = ""; |
156 | 160 | $files = []; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->params[strtoupper($name)] = $value; |
52 | 52 | } |
53 | 53 | |
54 | - $this->stdin = $stdin; |
|
54 | + $this->stdin = $stdin; |
|
55 | 55 | |
56 | 56 | rewind($this->stdin); |
57 | 57 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | while (!feof($stream)) { |
152 | 152 | $getContent = $fieldName && !$inHeader; |
153 | - $buffer = stream_get_line($stream, static::$bufferSize, "\n" . ($getContent ? '--'.$boundary : '')); |
|
153 | + $buffer = stream_get_line($stream, static::$bufferSize, "\n".($getContent ? '--'.$boundary : '')); |
|
154 | 154 | $buffer = trim($buffer, "\r"); |
155 | 155 | |
156 | 156 | // Find the empty line between headers and body |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | if ($getContent) { |
164 | 164 | if ($fieldType === 'data') { |
165 | - $post .= (isset($post[0]) ? '&' : '') . $fieldName . "=" . urlencode($buffer); |
|
165 | + $post .= (isset($post[0]) ? '&' : '').$fieldName."=".urlencode($buffer); |
|
166 | 166 | } elseif ($fieldType === 'file' && $filename) { |
167 | 167 | $tmpPath = tempnam($this->getUploadDir(), 'fastcgi_upload'); |
168 | 168 | $err = file_put_contents($tmpPath, $buffer); |