UPSTREAM FIX

magento2-40889: HTTP 500 when editing the Global design configuration scope on PHP 8.5

Community fix magento2-40889 merged into magento/magento2 on 2026-07-17, not in a release yet; applies cleanly to 2.4.9.

Fixes HTTP 500 when editing the Global design configuration scope on PHP 8.5 edited

Pull request title
`Using null as an array offset is deprecated, use an empty string instead` when editing global design config scope
Pull request
magento/magento2#40889
Issues
#40886 human
Author
@hostep
Merged
2026-07-17
Fixed in
no release yet
Reported on
2.4.9
Categories
Content
Components
magento/framework

Labels

Area
Content / CMS
Component
Config
Priority
P1
Severity
—
Reported on (labels)
2.4.9

Issue

Title and steps come from the upstream issue and pull request.

Description

HTTP 500 error returned. In developer mode the error below is shown:
1 exception(s):
Exception #0 (Exception): Deprecated Functionality: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/vendor/magento/framework/App/Config/ScopeCodeResolver.php on line 62

Steps to reproduce

Login to the admin and navigate to Content -> Design -> Configuration. Click Edit under Action on the Global scope

Expected result

User presented with the design configuration options for the Global scope

Actual result

HTTP 500 error returned. In developer mode the error below is shown:
1 exception(s):
Exception #0 (Exception): Deprecated Functionality: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/vendor/magento/framework/App/Config/ScopeCodeResolver.php on line 62

Taken from the upstream issue.

Error signatures

Code match per tag

Each tag was checked with git apply --check against that tag's files. A clean match means the change applies; it is not a test result. Tags that already contain the fix are marked.

LineCode match per tagTests
2.4.6
2.4.6 conflict 2.4.6-p1 conflict 2.4.6-p2 conflict 2.4.6-p3 conflict 2.4.6-p4 conflict 2.4.6-p5 conflict 2.4.6-p6 conflict 2.4.6-p7 conflict 2.4.6-p8 conflict 2.4.6-p9 conflict 2.4.6-p10 conflict 2.4.6-p11 conflict 2.4.6-p12 conflict 2.4.6-p13 conflict 2.4.6-p14 conflict 2.4.6-p15 conflict
2.4.6: no test data 2.4.6-p1: no test data 2.4.6-p2: no test data 2.4.6-p3: no test data 2.4.6-p4: no test data 2.4.6-p5: no test data 2.4.6-p6: no test data 2.4.6-p7: no test data 2.4.6-p8: no test data 2.4.6-p9: no test data 2.4.6-p10: no test data 2.4.6-p11: no test data 2.4.6-p12: no test data 2.4.6-p13: no test data 2.4.6-p14: no test data 2.4.6-p15: no test data
2.4.7
2.4.7 conflict 2.4.7-p1 conflict 2.4.7-p2 conflict 2.4.7-p3 conflict 2.4.7-p4 conflict 2.4.7-p5 conflict 2.4.7-p6 conflict 2.4.7-p7 conflict 2.4.7-p8 conflict 2.4.7-p9 conflict 2.4.7-p10 conflict
2.4.7: no test data 2.4.7-p1: no test data 2.4.7-p2: no test data 2.4.7-p3: no test data 2.4.7-p4: no test data 2.4.7-p5: no test data 2.4.7-p6: no test data 2.4.7-p7: no test data 2.4.7-p8: no test data 2.4.7-p9: no test data 2.4.7-p10: no test data
2.4.8
2.4.8 conflict 2.4.8-p1 conflict 2.4.8-p2 conflict 2.4.8-p3 conflict 2.4.8-p4 conflict 2.4.8-p5 conflict
2.4.8: no test data 2.4.8-p1: no test data 2.4.8-p2: no test data 2.4.8-p3: no test data 2.4.8-p4: no test data 2.4.8-p5: no test data
2.4.9
2.4.9 clean
2.4.9: passes before and after (test does not cover the fix)unit: passes before and after

Triage

Model @cf/cloudflare/clef. Probability this is a bug fix: 97.5%. Probability it is security relevant: 0.8%.

Show the model's answers and probabilities
QuestionAnswerProbabilitiesConfidence
Change kindbugfixbugfix 92.1%, refactor 3.0%, tests_only 1.7%, dependency 1.3%, feature 1.1%, docs_only 0.8%81.9%
Areaframeworkframework 85.2%, admin 10.5%, frontend 1.8%70.1%
Reported version2.4.92.4.9 61.9%, unspecified 1.4%, 2.4.8-p5 0.8%37.8%
Scope0.42 of 20 64.1%, 1 29.7%, 2 6.2%25.4%
Risk0.25 of 20 78.0%, 1 18.6%, 2 3.4%46.7%
Worth backporting1.52 of 22 64.5%, 1 22.7%, 0 12.8%22.7%

Download

For cweagans/composer-patches, choose a version below and download the bundle. Copy its magento2-40889/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Test files are always removed; paths are relative to each package root, using the default -p1 level.

Packages (1): magento/framework
Bundle README (what the ZIP ships)
# magento2-40889

Community fix merged upstream into magento/magento2, adapted by magento.watch.
This is not a patch published by Adobe.

Pull request: https://github.com/magento/magento2/pull/40889
Issue: https://github.com/magento/magento2/issues/40886
Author: @hostep
Source commit: b0358156885000ade0e4ce5ccbf376bc18c36aa3
Modifications: test files and documentation removed, paths rewritten relative to each Composer package.
Licence: OSL-3.0 / AFL-3.0, as the original Magento Open Source code.
Maintainer: Łukasz Bajsarowicz (@lbajsarowicz)

Licence: Magento Open Source code under OSL-3.0 and AFL-3.0. The bundle carries the original author, source commit and the list of modifications.

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.