Skip to content

PHP8 compatibility issue with array_merge #39579

Open
@chazzs

Description

@chazzs

When using \Magento\UrlRewrite\Model\StorageInterface::replace() when the url rewrite does not exist throws out ArgumentCountError: array_merge() does not accept unknown named parameters in .../vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php:223

Code documentation for replace() reads Save new url rewrites and remove old if exist. this indicates that this function should succeed/finish (not throw an exception) if the URLrewrite does not currently exist.

is this an error or an error in code documentation? If it is an error in documentation should it not throw out a more meaningful exception rather than a core php error?

Metadata

Metadata

Assignees

Labels

Area: FrameworkComponent: UrlRewriteIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

  • Status

    Ready for Development

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions