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

PHP 8.1 Deprecation notice at yoast-seo.php: "Automatic conversion of false to array is deprecated" #4842

Closed
4 tasks
alfonso100 opened this issue Mar 22, 2022 · 0 comments · Fixed by #4732
Closed
4 tasks
Assignees
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@alfonso100
Copy link
Contributor

Before submitting an issue please check that you’ve completed the following steps:
Yes - Made sure you’re on the latest version
Yes - Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug

When using PHP 8.1, we'll get a Deprecation notice:

Automatic conversion of false to array is deprecated wp-content/plugins/wp-rocket/inc/3rd-party/plugins/seo/yoast-seo.php:10

it is happening here:

$yoast_seo_xml['enablexmlsitemap'] = isset( $yoast_seo['enable_xml_sitemap'] ) && $yoast_seo['enable_xml_sitemap']; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals

To Reproduce
Steps to reproduce the behavior:

  1. Update to PHP 8.1
  2. Enable Yoast SEO and activate sitemap preload
  3. See the deprecation notice

Expected behavior
We should not cause any deprecation notices

Screenshots
If applicable, add screenshots to help explain your problem.
2022-03-22-at-14-51-10

Additional context
Ticket: https://secure.helpscout.net/conversation/1816071909/331622?folderId=2683093

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@remyperona remyperona added type: bug Indicates an unexpected problem or unintended behavior 3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting labels Mar 22, 2022
@remyperona remyperona linked a pull request Mar 24, 2022 that will close this issue
5 tasks
@remyperona remyperona self-assigned this Mar 24, 2022
@remyperona remyperona added this to the 3.11.1 milestone Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants