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

avoid undefined array key 'price_field_value_id' errors in php 8 #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmcclelland
Copy link
Contributor

I'm not sure if skipping a missing key is best or whether it should be kept and set to ''?

Without this patch I get:

PHP Warning] Undefined array key "price_field_value_id" at /var/www/powerbase/sites/all/extensions/iats/CRM/Iats/Transaction.php:41

@adixon
Copy link
Contributor

adixon commented Sep 18, 2024

Ah, okay, this sounds like it comes from a case where the original/template contribution used the old way of defining simple donation options, or maybe even using webform. I wonder whether that missing price_field_value_id might cause issues in the future? Does this issue/sql tell you anything useful about where the missing price_field_value_id arises?

In other words, I wonder whether this is a symptom of a problem that shouldn't be ignored.

@jmcclelland
Copy link
Contributor Author

I'm not entirely sure. Unfortunately, we have 50 CiviCRM installs on this server and I get these errors as output from the one cron job that executes all cron jobs for all sites, so I'm not even sure which site generated it :(.

@adixon
Copy link
Contributor

adixon commented Sep 18, 2024

Well, there's a challenge. How about a little debugging code in the [shared?] iats extension so that it writes out the domain to the log?

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

Successfully merging this pull request may close these issues.

2 participants