subscribepro-magento2-ext icon indicating copy to clipboard operation
subscribepro-magento2-ext copied to clipboard

#critical bug getimagesize on svg don't work and breaking my saved card area in customer account.

Open 4j4yk opened this issue 10 months ago • 1 comments

Issue -

#https://github.com/subscribepro/subscribepro-magento2-ext/blob/ef5a8412ff933faa460667e3c788dc5f5a56ae7c/Plugin/Payment/CcConfigProvider.php#L51-L63

Steps to produce -

  • Create a subscription, and make sure the card is vaulted/saved
  • visit customer my saved card section, which will result in an error

error -

[2024-04-02T18:22:19.751039+00:00] report.CRITICAL: TypeError: PayPal\Braintree\Block\Customer\CardRenderer::getIconWidth(): Return value must be of type int, null returned in  /vendor/paypal/module-braintree-core/Block/Customer/CardRenderer.php:76
Stack trace:

Workaround -

  • Disable the plugin via di.xml

Solution -

  • Replace SVG image with png or use existing one.

Notes -

Magento native code uses png files. https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Payment/Model/CcConfigProvider.php#L74-L86

Di for plugin having issue - https://github.com/subscribepro/subscribepro-magento2-ext/blob/ef5a8412ff933faa460667e3c788dc5f5a56ae7c/etc/di.xml#L169-L171

4j4yk avatar Apr 04 '24 15:04 4j4yk