Ensure disable_funding setting exist before getting it

This commit is contained in:
dinamiko 2022-02-25 11:55:04 +01:00
parent ed40129c44
commit 7270947ac2

View file

@ -147,7 +147,7 @@ class LoginSellerEndpoint implements EndpointInterface {
$accept_cards = (bool) ( $data['acceptCards'] ?? true );
$funding_sources = array();
if ( $this->settings->get( 'disable_funding' ) ) {
if ( $this->settings->has( 'disable_funding' ) && $this->settings->get( 'disable_funding' ) ) {
$funding_sources = $this->settings->get( 'disable_funding' );
if ( ! is_array( $funding_sources ) ) {
$funding_sources = array();