This Magento install doesn't even use the PayPal module, yet when running setup:upgrade, it results in:
Unable to apply data patch Magento\Paypal\Setup\Patch\Data\UpdateBmltoPayLater for module Magento_Paypal. Original exception message: Notice: Undefined offset: 1 in /path/to/magento/vendor/magento/module-paypal/Setup/Patch/Data/UpdateBmltoPayLater.php on line 138
The code at line 138 indicates that it's trying to access the PayPal BML module's config paths freshly grabbed from the DB then split them into two pieces separated by underscores. The problem is in the DB in table `core_config_data` exists this entry: `payment/paypal_express_bml/active`.
$settingParts requires the last part of that path have an underscore in it to work, yet this does not (it's just 'active').
Yet all modules appear to have an 'active' DB entry (which isn't a surprise to me). So I inserted the following code on line 138 to fix it.
if ($page === 'active') continue;
This seems like a bug to me as I can't imagine what scenario *wouldn't* have an 'active' setting for the module in the DB.
Hah, shoulda searched github. https://github.com/magento/magento2/issues/33678
Please use the following patch to fix this issue