Skip to content

Commit bc2d199

Browse files
authored
Update Request.php
1 parent 9e2b586 commit bc2d199

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/Http/Request.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,18 @@ public static function buildPostBody($fields, $files, $boundary = null){
230230

231231
$body = '';
232232

233-
foreach($fields as $name => $value){
234-
//checkboxes can have multiple values in an array.
235-
if(is_array($value)){
236-
foreach($value as $v){
237-
$body .= sprintf($part_field, $boundary, "{$name}[]", $v);
238-
$body .= "{$v}\r\n";
239-
}
240-
} else {
241-
$body .= sprintf($part_field, $boundary, $name, $value);
242-
$body .= "{$value}\r\n";
243-
}
244-
}
233+
foreach($fields as $name => $value){
234+
//checkboxes can have multiple values in an array.
235+
if(is_array($value)){
236+
foreach($value as $v){
237+
$body .= sprintf($part_field, $boundary, "{$name}[]", $v);
238+
$body .= "{$v}\r\n";
239+
}
240+
} else {
241+
$body .= sprintf($part_field, $boundary, $name, $value);
242+
$body .= "{$value}\r\n";
243+
}
244+
}
245245

246246
// data better have [name, tmp_name, and optional type]
247247
foreach($files as $name => $values) {

0 commit comments

Comments
 (0)