If you get this error when running bin / magento setup: upgrade command
Unable to apply data patch Magento\Paypal\Setup\Patch\Data\UpdateBmltoPayLater for module Magento_Paypal.
Original exception message: Notice:
Undefined offset: 1 in /vendor/magento/module-paypal/Setup/Patch/Data/UpdateBmltoPayLater.php on line 138
then you need to execute the following command in the Database
DELETE FROM `core_config_data` WHERE path="payment/paypal_express_bml/active";