Closed magnuskl closed 1 year ago
Hi,
Thanks for reporting this bug. I think we are using the wrong variable here. I'll look into it.
Other instances of this bug seem to be present elsewhere in the code, producing the same error. For instance see, see line 1030, also in wc-gateway-vipps-recurring.php.
This should be fixed when feat/api-v3 is merged, as everything has been refactored to use classes in and out of the API now. I will finish that branch up shortly – it should already be fully working, although it is missing some error handling code and I don't want to make any guarantees yet.
For now I'll re-open this issue in-case it is still an issue somewhere within api-v3, which I will check soon. There may be places where we're grabbing data from WooCommerce where a class for the given resource is not yet instantiated
Sounds good. Thank you!
Hi,
Can you try the newest version of the plugin? This shouldn't be an issue anymore, and I can't re-create it. Although I'd appreciate if you can check it out 😄
I do not see that error occurring in the PHP error logs anymore.
Line 1104 in wc-gateway-vipps-recurring.php tends to produce an uncaught
TypeError
when$agreement_id
is a string. This triggers a mere warning in PHP 7.4—but a fatal error in PHP 8.0, causing the script to abort. See also: PHP Manual → Appendices → Migrating from PHP 7.4.x to PHP 8.0.x → Backward Incompatible Changes.