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

Undefined index path for installations in root directory #772

Open
layoutd opened this issue Jun 12, 2023 · 0 comments
Open

Undefined index path for installations in root directory #772

layoutd opened this issue Jun 12, 2023 · 0 comments
Labels
priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue is a confirmed bug.

Comments

@layoutd
Copy link
Collaborator

layoutd commented Jun 12, 2023

Describe the bug:

The method API\Base::trigger_verification() has support for verifying site ownership for WordPress/WooCommerce installs in sub-directories (e.g., /store/), but shows a PHP notice for installs in the root directory:

PHP Notice: Undefined index: path in /…/plugins/pinterest-for-woocommerce/src/API/Base.php on line 380

This is because wp_parse_url() doesn't add any path index in this situation, which leads to an undefined index notice.

Steps to reproduce:

  1. Install WP, WC and Pinterest in at the root of a domain accessible to the Pinterest verification (e.g., https://025c-88-3-151-32.ngrok-free.app)
  2. Enable WP error logging.
  3. Go through the connection Pinterest onboarding process and confirm that the notice is logged during site verification.

Expected behavior:

No notice.

Actual behavior:

PHP Notice

Additional details:

PHP 7.4, WP 6.2, WC 7.8, Pinterest 1.3.2

@layoutd layoutd added type: bug The issue is a confirmed bug. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. labels Jun 12, 2023
@layoutd layoutd assigned layoutd and unassigned layoutd Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

1 participant