|
@@ -51,7 +51,7 @@ discard block |
|
|
block discarded – undo |
|
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
|
} |
|
@@ -159,7 +159,7 @@ discard block |
|
|
block discarded – undo |
|
159
|
159
|
|
|
160
|
160
|
while (!feof($stream)) { |
|
161
|
161
|
$getContent = $fieldName && !$inHeader; |
|
162
|
|
- $buffer = stream_get_line($stream, static::$bufferSize, "\n" . ($getContent ? '--'.$boundary : '')); |
|
|
162
|
+ $buffer = stream_get_line($stream, static::$bufferSize, "\n".($getContent ? '--'.$boundary : '')); |
|
163
|
163
|
$buffer = trim($buffer, "\r"); |
|
164
|
164
|
|
|
165
|
165
|
// Find the empty line between headers and body |
|
@@ -171,7 +171,7 @@ discard block |
|
|
block discarded – undo |
|
171
|
171
|
|
|
172
|
172
|
if ($getContent) { |
|
173
|
173
|
if ($fieldType === 'data') { |
|
174
|
|
- $post .= (isset($post[0]) ? '&' : '') . $fieldName . "=" . urlencode($buffer); |
|
|
174
|
+ $post .= (isset($post[0]) ? '&' : '').$fieldName."=".urlencode($buffer); |
|
175
|
175
|
} elseif ($fieldType === 'file' && $filename) { |
|
176
|
176
|
$tmpPath = $this->getUploadDir().'/'.substr(md5(rand().time()), 0, 16); |
|
177
|
177
|
$err = file_put_contents($tmpPath, $buffer); |
Please login to merge, or discard this patch.