Support

Home Forums Event Espresso Premium EE3 PHP8.0 Fatal Error

EE3 PHP8.0 Fatal Error

Posted: January 11, 2023 at 9:03 am


Brossess14

January 11, 2023 at 9:03 am

We get the following error when moving to php 8.0 – PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct(), 0 passed in /public/wp-includes/class-wp-widget-factory.php on line 62 and at least 2 expected in /public/wp-includes/class-wp-widget.php:163


Tony

  • Support Staff

January 11, 2023 at 12:49 pm

Hi there,

Can you add any more details on this, how do you know the above relates to Event Espresso? Is there a stack trace within the error, if so can you include that here?

What page is it thrown on?

I’m running EE3 on PHP8.0 without the above issue but it could be related to a specific setup that I don’t have, apparently something regarding widgets, but I’m using the EE widgets already.


Brossess14

January 12, 2023 at 7:08 pm

here’s the full error log:

2023/01/13 02:08:14 [error] 75422#75422: *409 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct(), 0 passed in /www/castandup_272/public/wp-includes/class-wp-widget-factory.php on line 62 and at least 2 expected in /www/castandup_272/public/wp-includes/class-wp-widget.php:163
Stack trace:
#0 /www/castandup_272/public/wp-includes/class-wp-widget-factory.php(62): WP_Widget->__construct()
#1 /www/castandup_272/public/wp-includes/widgets.php(115): WP_Widget_Factory->register(‘Event_Espresso_…’)
#2 /www/castandup_272/public/wp-content/plugins/aa-event-espresso/espresso.php(471): register_widget(‘Event_Espresso_…’)
#3 /www/castandup_272/public/wp-includes/class-wp-hook.php(308): load_event_espresso_widget(”)
#4 /www/castandup_272/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)
#5 /www/castandup_272/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /www/castandup_272/public/wp-includes/widgets.php(1854): do_action(‘widgets_init’)
#7 /www/c” while reading response header from upstream, client: 73.31.242.101, server: staging-castandup.kinsta.cloud, request: “GET /wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s= HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php8.0-fpm-castandup.sock:”, host: “staging-castandup.kinsta.cloud:44837”, referrer: “https://staging-castandup.kinsta.cloud/wp-admin/plugins.php”


Tony

  • Support Staff

January 13, 2023 at 4:27 am

Hmmm, ok, strange, I’m not getting the same error.

Can you post the content of \templates\widget.php to something like Pastebin so I can view the contents?

The error you are getting doesn’t really make sense with the default EE widget.

Are you loading any custom widgets for EE?


Brossess14

January 17, 2023 at 12:18 pm

Ok, we found and fixed the issue. the construct method was wrong. however we are now running into a number of other issues.

here’s one – we cannot delete attendees

2023/01/17 19:14:41 [error] 4514#4514: *34 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to undefined function each() in /www/castandup_272/public/wp-content/plugins/event-espresso/includes/admin-reports/event_list_attendees.php:25
Stack trace:
#0 /www/castandup_272/public/wp-content/plugins/event-espresso/includes/event-management/index.php(124): event_list_attendees()
#1 /www/castandup_272/public/wp-includes/class-wp-hook.php(308): event_espresso_manage_events(”)
#2 /www/castandup_272/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)
#3 /www/castandup_272/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /www/castandup_272/public/wp-admin/admin.php(259): do_action(‘event-espresso_…’)
#5 {main}
thrown in /www/castandup_272/public/wp-content/plugins/event-espresso/includes/admin-reports/event_list_attendees.php on line 25″ while reading upstream, client: 2601:5cc:c400:2900:dca7:2df9:f232:daac, server: staging-castandup.kinsta.cloud, request: “POST /wp-admin/admin.php?page=events&event_admin_reports=list_attendee_payments HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php8.0-fpm-castandup.sock:”, host: “staging-castandup.kinsta.cloud:44837”, referrer: “https://staging-castandup.kinsta.cloud/wp-admin/admin.php?page=events&event_admin_reports=event_list_attendees&today_a=true”


Brossess14

January 18, 2023 at 9:49 pm

Ok – resolved the error above replacing each with foreach
– now i have one more error –

Fatal error: Uncaught Error: Call to undefined function espresso_generate_events_page_list_table_sql() in /www/castandup_272/public/wp-content/plugins/event-espresso/includes/admin-reports/event_list_attendees.php:107 Stack trace: #0 /www/castandup_272/public/wp-content/plugins/event-espresso/includes/event-management/index.php(127): require_once() #1 /www/castandup_272/public/wp-includes/class-wp-hook.php(308): event_espresso_manage_events(”) #2 /www/castandup_272/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #3 /www/castandup_272/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /www/castandup_272/public/wp-admin/admin.php(259): do_action(‘event-espresso_…’) #5 {main} thrown in /www/castandup_272/public/wp-content/plugins/event-espresso/includes/admin-reports/event_list_attendees.php on line 107


Tony

  • Support Staff

January 23, 2023 at 4:32 pm

Line 9 of the above file should be requiring the file with that function within it already:

require_once(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/event-management/queries.php');

Are you sure you haven’t included an additional } to close the event_list_attendees function early?

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

Event Espresso