Posted: September 19, 2022 at 2:09 am
Hi, I’ve just purchased a new licence, did an upgrade of my EE3 and now I am getting a warning message on the Edit Attendee Data page, top right corner, just above the Ticket Prices section.
Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/30/d192640622/htdocs/hosting/dslrphotographycourses.com/wp-content/plugins/event-espresso/includes/admin-reports/edit_attendee_record.php on line 677
I am using the latest version of WordPress.
Can someone please get back to me with a fix?
That warning is basically saying the count() function was not passed an array or object that it count run on to return a value, it works as is but throws a warning to show ‘something’ isn’t right.
In this case, count isn’t needed and empty() can be used, so to fix this if you are comfortable with PHP you can change:
On line 677 will be something like:
Change that to be:
Currently, EE3 is only receiving security updates (we do not have any currently), but as this is a simple localized fix I’ll create a ticket for this so it’s included on the next release if a security report comes in.
Yes, that worked – thank you!
You’re most welcome.