OpenMage / magento-lts

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
https://www.openmage.org
Open Software License 3.0
865 stars 436 forks source link

Error when saving product with image without description #4023

Closed MateusM3 closed 3 months ago

MateusM3 commented 4 months ago

Preconditions (*)

  1. OpenMage 20.8.0
  2. PHP 8.2

Steps to reproduce (*)

  1. Open the Catalog -> Create Product -> Upload Images -> with out description (label) -> Save

Expected result (*)

  1. Saving the product with an empty label like previous versions, may be the version of PHP that is more careful regarding the array key not existing

Actual result (*)

error-img-default

fballiano commented 4 months ago

@MateusM3 can you test https://github.com/OpenMage/magento-lts/pull/4024?

MateusM3 commented 3 months ago

Thaks @fballiano ! But Its was partially corrected, still with the error on line 170, I corrected it as follows, taking your correction as an example image

Can you update your Pull request with this correction too?

kiatng commented 3 months ago

I cannot reproduce the error on ver21 beta2.

On 20.8, I have

Warning: Undefined array key "label_use_default" in .../app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php on line 250

fballiano commented 3 months ago

@kiatng on v21 I see the same error, did you enable developer mode there too?

fballiano commented 3 months ago

@MateusM3 how do you trigger the error you see on line 170? I can't reproduce it with my patch #4024

MateusM3 commented 3 months ago

@fballiano I tested it here and it worked, thank you! Would it be possible to release a version 20.9.1 with this fix? I wanted to update here about having to overwrite the class