Skip to content

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

Open
jmcclelland wants to merge 1 commit into
iATSPayments:masterfrom
progressivetech:undefined-array-key
Open

avoid undefined array key 'price_field_value_id' errors in php 8#463
jmcclelland wants to merge 1 commit into
iATSPayments:masterfrom
progressivetech:undefined-array-key

Conversation

@jmcclelland

Copy link
Copy Markdown
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

adixon commented Sep 18, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

adixon commented Sep 18, 2024

Copy link
Copy Markdown
Contributor

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