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

PPCP - Under PHP 8.1 throws thousands of warnings #3052

Closed
havenswift-hosting opened this issue Aug 30, 2022 · 17 comments
Closed

PPCP - Under PHP 8.1 throws thousands of warnings #3052

havenswift-hosting opened this issue Aug 30, 2022 · 17 comments

Comments

@havenswift-hosting
Copy link

The changes needed for core for 8.1 are likely going to be needed for all plugins - for example PayPal Commerce under 8.1 throws huge numbers of notices, warnings etc into the PHP error_log

@bhsmither
Copy link
Contributor

Any sense of how many are not 'Undefined variable' and 'Undefined array key' for PayPal Commerce?

@havenswift-hosting
Copy link
Author

Nope - deleted the 9MB with several hundred thousands lines added to the error_log file created in a few hours and downgraded client back to 7.4

@claudia39
Copy link

I saved a compressed file of the error log when it was at about 24000 lines. Do you want me to email it to you Brian? Also sinceI've been put back to PHP 7.4 I've gotten a few PayPal warnings. Should I send you those too?
Claudia

@bhsmither
Copy link
Contributor

If the error_log relates to the PayPal module (or any other module), then yes. Otherwise, because I have been working through the core code with PHP8.1, I won't find much that I haven't already reported.

So, yes, email it to me.

@claudia39
Copy link

claudia39 commented Aug 30, 2022 via email

@claudia39
Copy link

Did you get the attachment?

@bhsmither
Copy link
Contributor

Nothing sent directly to me from you.

@bhsmither
Copy link
Contributor

I haven't found anything that screams "Fix me now!" that hasn't already been made an issue.

A lot of log entries (again, these errors are not important) can be quieted with this:
smarty-php/smarty#789

@abrookbanks
Copy link
Member

Yes it needs an update but from my testing works fine on PHP 8.1. I'll get around to this asap.

@abrookbanks abrookbanks changed the title PayPal Commerce under PHP 8.1 throws thousands of warnings PPCP - Under PHP 8.1 throws thousands of warnings Sep 7, 2022
@abrookbanks
Copy link
Member

Hi @bhsmither

Are you working on this one? I don't want to step on your toes if so. Let me know if not and I'll jump on this. Happy to take this on if you want to share findings so far?

@bhsmither
Copy link
Contributor

I am not.

@abrookbanks
Copy link
Member

abrookbanks commented Sep 8, 2022 via email

@bhsmither
Copy link
Contributor

bhsmither commented Sep 8, 2022

These are the errors that were logged in an error report sent to me that relate to PPCP:

Undefined global variable $cart in /paypal_commerce/paypal.class.php on line 435
Attempt to read property "basket" on null in /paypal_commerce/paypal.class.php on line 435
Trying to access array offset on value of type null in /paypal_commerce/paypal.class.php on line 435
Attempt to read property "server_response_code" on string in /plugins/paypal_commerce/paypal.class.php on line 972
Undefined variable $disable_funding in /paypal_commerce/paypal.class.php on line 697
Undefined variable $placement in /paypal_commerce/hooks/class.gui.head_js.php on line 57
Undefined global variable $_GET in /paypal_commerce/hooks/class.gui.head_js.php on line 13
Trying to access array offset on value of type null in /paypal_commerce/hooks/class.gui.head_js.php on line 13
Undefined global variable $_GET in /paypal_commerce/hooks/class.gui.head_js.php on line 33
Trying to access array offset on value of type null in /paypal_commerce/hooks/class.gui.head_js.php on line 33
Undefined global variable $_GET in /paypal_commerce/hooks/class.gui.head_js.php on line 86
Trying to access array offset on value of type null in /paypal_commerce/hooks/class.gui.head_js.php on line 86
Undefined array key "digital_only" in /paypal_commerce/paypal.class.php on line 1099
Undefined array key "delivery_address" in /paypal_commerce/paypal.class.php on line 1102
Trying to access array offset on value of type null in /paypal_commerce/paypal.class.php on line 1102
Undefined array key "billing_address" in /paypal_commerce/paypal.class.php on line 1110
Trying to access array offset on value of type null in /paypal_commerce/paypal.class.php on line 1110
Undefined array key "shipping" in /paypal_commerce/paypal.class.php on line 1082
Trying to access array offset on value of type null in /paypal_commerce/paypal.class.php on line 1082

@abrookbanks
Copy link
Member

abrookbanks commented Sep 9, 2022 via email

@abrookbanks
Copy link
Member

Your version of PayPal Commerce must be out of date as I can't match up most of these errors.

@havenswift-hosting
Copy link
Author

It was running the latest version at the time

@abrookbanks
Copy link
Member

1.7.2 released which should catch most if not all. If you do find more let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants