Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed passing null for str_replace is deprecated for downloadable products #3330

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

kyrena
Copy link
Contributor

@kyrena kyrena commented Jun 16, 2023

Description

This fix passing null to parameter #3 ($subject) of type array|string is deprecated for str_replace with PHP 8.1/8.2.
Perhaps it's not the best way. Only for download product edit page in backend.

The deprecated notice is triggered by _prepareFileForPath of Mage_Downloadable_Helper_File.

See also this discussion comment.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

…_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Links
@github-actions github-actions bot added the Component: Downloadable Relates to Mage_Downloadable label Jun 16, 2023
@kyrena kyrena changed the title Fixed passing null for str_replace is deprecated for download products Fixed passing null for str_replace is deprecated for downloadable products Jun 16, 2023
@luigifab luigifab added the PHP 8.1 Related to PHP 8.1 label Jun 16, 2023
@fballiano fballiano merged commit 15f7623 into OpenMage:main Jun 19, 2023
@kyrena kyrena deleted the php82-ddl branch June 20, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Downloadable Relates to Mage_Downloadable PHP 8.1 Related to PHP 8.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants