Support

Home Forums Event Espresso Premium Edit attendee data – warning line 677

Edit attendee data – warning line 677

Posted: September 19, 2022 at 2:09 am


Roland Pokrywka

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.

it says:

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?

Many thanks,

Roland


Tony

  • Support Staff

September 20, 2022 at 5:17 am

Hi Roland,

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:

/event-espresso/includes/admin-reports/edit_attendee_record.php

On line 677 will be something like:

<?php if (count($additional_attendees) > 0) { ?>

Change that to be:

<?php if (!empty($additional_attendees)) { ?>

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.


Roland Pokrywka

September 23, 2022 at 12:09 pm

Yes, that worked – thank you!


Tony

  • Support Staff

September 26, 2022 at 4:05 am

You’re most welcome.

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso