-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fixed fatal error in PHP 8.0 #52
base: master
Are you sure you want to change the base?
Conversation
@Edzelopez Thanks for the PR, however I'm not entirely sure that it solves the problem - it only masks it. From your backtrace:
If you look at the method in question, it bails unless the API operation is So it seems that the real issue is why |
Hey @christianwach Yes, I am using a FormProcessor to save two addresses, but they are for two different actions altogether (One creates an address for an Individual and one for an Organization). The code that apparently is causing an issue is here and it certainly does look like 'create' is passed. We've had this working for a while before we switched to PHP 8.0, when this came up. The only thing I can think of is if somehow the action is returning something here even for new contacts, which would trigger an edit instead of a create. Let me investigate and get back to you as I might have to submit a PR to action-provider then. Thanks for the direction! |
@Edzelopez One more thought... what is
I can't find any mention of that plugin anywhere. It would be worth sending the content of the API call to your error logs to see what's happening there |
Hey @christianwach That is a custom plugin developed by JMA. L421 just calls the FormProcessor API |
@Edzelopez Okay, so you'll need to dig into what that's doing behind the scenes and what's in the
Lots of error logging in the path of the backtrace should give you a clearer idea of the sequence of calls - without that, I'm not sure how to debug what's going on. EDIT 1: Okay, so I see that that's what you linked me to above - sorry! FYI I've never seen a EDIT 2: Oh, I see, it's an Extension. There sure are a lot of moving parts to your issue! As I said, I think lots of error logging is needed. |
@Edzelopez FWIW I can see a weakness in the code in this plugin... when we consider: civicrm-wp-profile-sync/includes/acf/classes/cwps-acf-google-map.php Lines 651 to 689 in 72d88d4
So, let's say an Address with a Contact ID is edited:
Unfortunately, unlike some hooks, |
@Edzelopez I don't know if you're still hitting this problem, but perhaps e6c6092 goes some way to solving it? Switching to Symfony hooks is too great a task for me without someone helping out, but this might just do the trick. |
When submitting an ACF form containing address fields, the code seems to assume that a new contact has a previous address. Submitting the form leads to this fatal error post the PHP upgrade: