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

Fatal error when using GLA 2.4.7 and flexible-shipping-ups plugin #1976

Closed
ianlin opened this issue Jun 8, 2023 · 0 comments · Fixed by #1977
Closed

Fatal error when using GLA 2.4.7 and flexible-shipping-ups plugin #1976

ianlin opened this issue Jun 8, 2023 · 0 comments · Fixed by #1977
Assignees
Labels
type: bug The issue is a confirmed bug.

Comments

@ianlin
Copy link
Member

ianlin commented Jun 8, 2023

Describe the bug:

Reported in p1686202399910239-slack-C7U3Y3VMY and originally from the support forum.

GLA 2.4.7 uses psr/http-message 2.0 while the flexible-shipping-ups plugin uses 1.1. In 2.0 it adds function return types in the class interface and in GLA we didn't add prefix to psr/http-message library so the fatal error happened.

Here's the error:

2023-06-07T11:48:32+00:00 CRITICAL Declaration of UpsFreeVendor\GuzzleHttp\Psr7\Uri::getScheme() must be compatible with Psr\Http\Message\UriInterface::getScheme(): string in /home/795922.cloudwaysapps.com/axqxgxgnqn/public_html/wp-content/plugins/flexible-shipping-ups/vendor_prefixed/guzzlehttp/psr7/src/Uri.php on line 346

Steps to reproduce:

Note that I personally couldn't reproduce the error as I did not set up the UPS plugin properly. But from the log the root cause is obvious so we should add the prefix to psr/http-message library.

  1. Install GLA 2.4.7 and flexible-shipping-ups plugin.
  2. Go to wp-admin/admin.php?page=wc-settings&tab=shipping, add UPS Live Rates shipping method to the shipping zone you're testing.
  3. Go to cart and checkout page, notice the fatal error.

Expected behavior:

There shouldn't be fatal error.

Actual behavior:

The fatal error appears and the site crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant