WPIntell

Source evidence

Coding error in event.php – I think

Event Organiser · support · 2025-04-24T16:45:00+00:00

complaintsentiment
highseverity
0.97relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 35 rows with source links

20.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
AndyHenderson unresolved
We are calculating occurrences in our UI and using eo_update_event to update them in the Event Organiser database. I hate to raise an issue because I’ve used EO to support several charity sites with great success. However, we just got the following error: [24-Apr-2025 14:45:30 UTC] PHP Fatal error: Uncaught ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements in /homepages/0/d894882115/htdocs/clickandbuilds/HaylingU3A/wp-content/plugins/event-organiser/includes/event.php:381 Stack trace: #0 /homepages/0/d894882115/htdocs/clickandbuilds/HaylingU3A/wp-content/plugins/event-organiser/includes/event.php(381): array_combine() Looking at the code I see the following at lines 368 – 370: $update = array_uintersect( $occurrences, $current_occurrences, ‘_eventorganiser_compare_dates’ ); $update_2 = array_uintersect( $current_occurrences, $update, ‘_eventorganiser_compare_dates’ ); $keys = array_keys( $update_2 ); I’m struggling to understand the use of $update_2 but I think it might be trying to de-duplicate the occurrences. We try to avoid that in our UI but I’m not going to claim our code is perfect. The fatal occurs because $keys doesn’t match $update. However, shouldn’t the array_combine at 381 be using $update_2 and not $update? Similarly, shouldn’t the foreach at 383 be using $update_2 and not $update? – otherwise what’s the purpose of $update_2 since it’s not referenced anywhere in the code. Thanks again for the plug-in, Andy we’re experiencing the same issue, based on the recent reviews, we’re not the only ones..

Comments

1 shown
043web 2025-07-14T09:42:00+00:00

we’re experiencing the same issue, based on the recent reviews, we’re not the only ones..