cancel
Showing results for 
Search instead for 
Did you mean: 

Update from 2.4.0-p1 to 2.4.3 generates PayPal module error in file UpdateBmltoPayLater.php

Update from 2.4.0-p1 to 2.4.3 generates PayPal module error in file UpdateBmltoPayLater.php

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.

2 REPLIES 2

Re: Update from 2.4.0-p1 to 2.4.3 generates PayPal module error in file UpdateBmltoPayLater.php

Hah, shoulda searched github. https://github.com/magento/magento2/issues/33678

Re: Update from 2.4.0-p1 to 2.4.3 generates PayPal module error in file UpdateBmltoPayLater.php

Please use the following patch to fix this issue

https://github.com/magento/quality-patches/pull/61