Skip to content

Commit

Permalink
Fix encoding of nested parameters in multipart requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Apr 5, 2019
1 parent d14f02d commit 137adbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public static function create($params = null, $options = null)
if (is_null($opts->apiBase)) {
$opts->apiBase = Stripe::$apiUploadBase;
}
// Manually flatten params, otherwise curl's multipart encoder will
// choke on nested arrays.
$params = array_column(\Stripe\Util\Util::flattenParams($params), 1, 0);
return static::_create($params, $opts);
}
}

0 comments on commit 137adbc

Please sign in to comment.