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

fix deprecated warning in dashboard setup #38776

Merged
merged 1 commit into from Jun 19, 2023

Conversation

rrennick
Copy link
Contributor

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR converts the task actionUrl to a string before it's used as a parameter to string handling functions.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Update to PHP 8.1
  2. Load the WP dashboard in trunk
  3. See the following warning in the debug log
[16-Jun-2023 17:06:47 UTC] PHP Deprecated:  substr(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/ronrennick/Sites/wc/wp-content/woocommerce/plugins/woocommerce/includes/admin/class-wc-admin-dashboard-setup.php on line 97
  1. Switch to this branch & refresh the page
  2. No warning should be logged.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jun 16, 2023
@github-actions
Copy link
Contributor

Test Results Summary

Commit SHA: 83e92da

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 52s
E2E Tests1980010020815m 9s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@rrennick rrennick marked this pull request as ready for review June 16, 2023 17:56
@github-actions
Copy link
Contributor

Hi @jorgeatorres,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Member

@jorgeatorres jorgeatorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thank you @rrennick!

@jorgeatorres jorgeatorres merged commit 08c0d0a into trunk Jun 19, 2023
19 checks passed
@jorgeatorres jorgeatorres deleted the fix/dashboard-setup-warning branch June 19, 2023 18:05
@github-actions github-actions bot added this to the 7.9.0 milestone Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants