Skip to content

[Issue] 2.4.9: Braintree module crashes at checkout in developer mode due to direct load of static content image #40856

@Silarn

Description

@Silarn

Preconditions and environment

  • Magento 2.4.9
  • Braintree module enabled
  • Developer mode

Steps to reproduce

  1. Attempt to load checkout without static content fully generated (which is normal in dev mode)

Expected result

Checkout should load

Actual result

Crash due to missing image on 'getimagesizefromstring' in \PayPal\Braintree\Gateway\Config\PayPal\Config line 256.

Additional information

To elaborate, because developer mode is supposed to dynamically generate static assets as they are loaded, the images are not pregenerated.

This code attempts to directly load an image using the static content path which does not yet exist via the filesystem and crashes when '$imageData' is false.

This should use 'getSourceFile()' instead which uses the original image location in the module, which should always be availabe.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Needs Update

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions