Skip to content

Fix deprecated warnings related to using null as an array offset - #5713

Open
B3Hana wants to merge 3 commits into
OpenMage:mainfrom
B3Hana:fix-85
Open

Fix deprecated warnings related to using null as an array offset#5713
B3Hana wants to merge 3 commits into
OpenMage:mainfrom
B3Hana:fix-85

Conversation

@B3Hana

@B3Hana B3Hana commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description (*)

PHP 8.5 deprecated the use of null as an array offset and as a key for the array_key_exists function

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

Use the markers below as a guide to replicate the warnings/errors(in dev mode)

  • open install setup
  • save product without image
  • export product
  • export customers
  • save customer
  • save internal product attribute
  • open tax rate form

Questions or comments

Mage_Core_Controller_Varien_Action::202 If no action is set, like in install setup
Mage_Catalog_Model_Product_Attribute_Backend_Media::171 If no image was added to the gallery array ('image' => NULL,'small_image' => NULL,'thumbnail' => NULL) while saving
Mage_ImportExport_Model_Export_Entity_Product::529 If a product is not assigned to any category while export
Mage_ImportExport_Model_Export_Entity_Product::666 If a product value is not set for any product while export
Mage_ImportExport_Model_Export_Entity_Customer::405 If a customer value is not set for any customer while saving
Mage_Eav_Model_Config::490 If an internal product attribute is saved (attribute code is disabled)
Mage_Adminhtml_Block_Tax_Rate_Form::146 Varien_Data_Form::125 throws, because no id was set for the tax_rate_title_fieldset

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All automated tests passed successfully (all builds are green, SonarCloud checks are not required to merge)

@sonarqubecloud

Copy link
Copy Markdown

@Hanmac

Hanmac commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@sreichel what would be the best way to fix this check?

It's not possible to have Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset extend from Mage_Core_Block_Abstract because it does extend from Varien_Data_Form_Element_Fieldset

Unless the part is reworked that Mage_Adminhtml_Block_Tax_Rate_Title_Fieldset isn't needed anymore.
Like Mage_Adminhtml_Block_Tax_Rate_Title should implement Varien_Data_Form_Element_Renderer_Interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants