-
Notifications
You must be signed in to change notification settings - Fork 44
fix(homepage-articles): use map_deep to construct articles_rest_url and resolve PHP 8.1 warnings #1655
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
Conversation
…nd resolve PHP 8.1 warnings
|
Thanks! |
|
🎉 This PR is included in version 3.0.0-epic-test-epic-release-flow-raz.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.0.0-epic-ras-acc.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [3.0.0-alpha.1](v2.6.2...v3.0.0-alpha.1) (2024-02-08) ### Bug Fixes * **homepage-articles:** use map_deep to construct articles_rest_url and resolve PHP 8.1 warnings ([#1655](#1655)) ([24085d8](24085d8)) * prevent error in modal-checkout check ([7e2a6c7](7e2a6c7)) ### Features * **ci:** add `epic/*` release workflow and rename `master` to `trunk` ([#1656](#1656)) ([c788e55](c788e55)) * deprecate streamlined (Stripe) Donate block version ([#1638](#1638)) ([11bd0d6](11bd0d6)) * **homepage-posts:** add custom taxonomy exclusions filter ([#1641](#1641)) ([b140a99](b140a99)) * **reader-revenue:** make NYP and Stripe Gateway optional ([#1645](#1645)) ([1322d7c](1322d7c)) ### BREAKING CHANGES * streamlined (Stripe) Donate block version is no more
|
🎉 This PR is included in version 3.0.0-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [3.0.0](v2.6.2...v3.0.0) (2024-02-20) ### Bug Fixes * **homepage-articles:** use map_deep to construct articles_rest_url and resolve PHP 8.1 warnings ([#1655](#1655)) ([24085d8](24085d8)) * prevent error in modal-checkout check ([7e2a6c7](7e2a6c7)) ### Features * **ci:** add `epic/*` release workflow and rename `master` to `trunk` ([#1656](#1656)) ([c788e55](c788e55)) * deprecate streamlined (Stripe) Donate block version ([#1638](#1638)) ([11bd0d6](11bd0d6)) * **homepage-posts:** add custom taxonomy exclusions filter ([#1641](#1641)) ([b140a99](b140a99)) * **reader-revenue:** make NYP and Stripe Gateway optional ([#1645](#1645)) ([1322d7c](1322d7c)) ### BREAKING CHANGES * streamlined (Stripe) Donate block version is no more
|
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
The
newspack_blocks_render_block_homepage_articles()function does this:However, array_map only works one level deep into arrays. When nested arrays are passed in, this code converts the sub array's value to the string "Array" which generates a warning:
Fix: Use
map_deep()from WordPress instead ( https://developer.wordpress.org/reference/functions/map_deep/ ).Example of one of the values passed in that causes this warning, before and after the mapping:
Notice that $v['rules'] is transformed from an actual array to the string
Array.How to test the changes in this Pull Request:
Other information: