mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Bump DataTable from 2.3.3 to 2.3.4, TinyMCE 8.0.2 to 8.2.0, Stripe-PHP 17.6.0 to 18.1.0, PHPMailer from 6.10.0 to 7.0.0, chartjs from 4.5.0 to 4.5.1
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
namespace Stripe\Util;
|
||||
|
||||
/**
|
||||
* @phpstan-type RequestOptionsArray array{api_key?: string, idempotency_key?: string, stripe_account?: string, stripe_context?: string, stripe_version?: string, api_base?: string, max_network_retries?: int }
|
||||
* @phpstan-type RequestOptionsArray array{api_key?: string, idempotency_key?: string, stripe_account?: string, stripe_context?: string|\Stripe\StripeContext, stripe_version?: string, api_base?: string, max_network_retries?: int }
|
||||
*
|
||||
* @psalm-type RequestOptionsArray = array{api_key?: string, idempotency_key?: string, stripe_account?: string, stripe_context?: string, stripe_version?: string, api_base?: string, max_network_retries?: int }
|
||||
* @psalm-type RequestOptionsArray = array{api_key?: string, idempotency_key?: string, stripe_account?: string, stripe_context?: string|\Stripe\StripeContext, stripe_version?: string, api_base?: string, max_network_retries?: int }
|
||||
*/
|
||||
class RequestOptions
|
||||
{
|
||||
@@ -14,6 +14,7 @@ class RequestOptions
|
||||
*/
|
||||
public static $HEADERS_TO_PERSIST = [
|
||||
'Stripe-Account',
|
||||
'Stripe-Context',
|
||||
'Stripe-Version',
|
||||
];
|
||||
|
||||
@@ -79,6 +80,12 @@ class RequestOptions
|
||||
}
|
||||
$other_options->headers = \array_merge($this->headers, $other_options->headers);
|
||||
|
||||
// special handling for stripe_context
|
||||
// if other sent an empty string, then we should unset
|
||||
if (\array_key_exists('Stripe-Context', $other_options->headers) && '' === $other_options->headers['Stripe-Context']) {
|
||||
unset($other_options->headers['Stripe-Context']);
|
||||
}
|
||||
|
||||
return $other_options;
|
||||
}
|
||||
|
||||
@@ -147,7 +154,7 @@ class RequestOptions
|
||||
}
|
||||
if (\array_key_exists('stripe_context', $options)) {
|
||||
if (null !== $options['stripe_context']) {
|
||||
$headers['Stripe-Context'] = $options['stripe_context'];
|
||||
$headers['Stripe-Context'] = (string) $options['stripe_context'];
|
||||
}
|
||||
unset($options['stripe_context']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user