Skip to content

Upgrade Issue, While upgrade from Magento 2.4.2-p1 to Magento 2.4.3 #33678

Closed
@arjunadobe

Description

@arjunadobe

Preconditions (*)

  1. Magento 2.4.3 (EE)
  2. Composer 2

Steps to reproduce (*)

Hi,

I am upgrading from Magento 2.4.2-p1 from Magento 2.4.3. Composer Update was working fine, but when I tried to run

php bin/magento setup:upgrade

I am getting the below error.

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
When I checked the code, I found out we didn't check whether the value is exploadable in some scenarios like this

path => payment/paypal_express_bml/active , value => 0

and it's throwing the error in this line

$page = $settingParts[0]; $setting = $settingParts[1];

Expected result (*)

While Setup:upgrade it should work fine

Actual result (*)

Module 'Magento_Paypal': 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

Fix for this :
Add if(strpos($setting, '_') == false) { continue }

foreach ($bmlSettings as $bmlPath => $bmlValue) { $setting = str_replace(self::BMLPATH, '', $bmlPath); if(strpos($setting, '_') == false) { continue; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ready for confirmationPriority: P0This generally occurs in cases when the entire functionality is blocked.Progress: doneReported on 2.4.3Indicates original Magento version for the Issue report.Severity: S1Affects critical data or functionality and forces users to employ a workaround.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions