#41309·magento2

[PHP 8.5] Product import uniqueness validation fails on existing NULL attribute value

Author: nh-mdevCreated Sep 24, 2026Updated Sep 28, 2026
LabelsIssue: needs updateReported on 2.4.9

Preconditions and environment

  • Magento Open Source 2.4.9; magento/module-catalog-import-export 101.1.9.
  • PHP 8.5.
  • Observed during a catalog_product import using Firebear ImportExport 3.8.8. Reproduction using Magento's native import UI has not yet been verified.
  • The affected catalog appears to contain a SQL NULL value in a product EAV attribute used for uniqueness validation. The specific attribute and row have not yet been identified.

Steps to reproduce

Observed path:

  1. On Magento 2.4.9 with PHP 8.5, run validation for a catalog_product import using Firebear ImportExport.
  2. Import a product with a non-empty value for a non-static product attribute configured as unique, where that attribute's existing EAV data includes a row with a SQL NULL value.
  3. Observe validation when Magento loads the existing values for its uniqueness check.

A minimal reproduction using only Magento's native import UI has not yet been confirmed.

Expected result

Magento completes uniqueness validation without a PHP deprecation exception. It either accepts a unique incoming value or reports a normal duplicate-attribute validation error.

Actual result

Validation reports:

Deprecated Functionality: Using null as an array offset is deprecated, use an empty string instead in vendor/magento/module-catalog-import-export/Model/Import/Product/UniqueAttributeValidator.php on line 85

The import log then reports 1 validation error and 0 checked entities. The exception prevents normal product validation.

Additional information

UniqueAttributeValidator::load() reads existing EAV rows and uses each row's value directly as an array key:

$result[$row['value']][] = $row[$idField];

When value is SQL NULL, PHP 8.5 emits the deprecation, which Magento treats as an exception. Earlier PHP versions converted that key to an empty string. Explicitly converting NULL to '' at this lookup preserves the previous cache-key behavior without changing non-NULL values.

Source: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/CatalogImportExport/Model/Import/Product/UniqueAttributeValidator.php#L85

Potentially related, but not the same failure: https://github.com/magento/magento2/issues/39434 reports NULL values in product EAV data. Other PHP 8.5 null-array-key failures have been addressed separately, for example https://github.com/magento/magento2/issues/40886.

Release note

Fixed product import validation on PHP 8.5 when an existing unique product attribute has a NULL EAV value.

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”.