Make WordPress Core

#58176 closed defect (bug) (duplicate)

when using php8.0 error: call_user_func_array(): Argument #1 ($callback) must be a valid callback...

Reported by: urseetaeler's profile urseetaeler Owned by:
Milestone: Priority: normal
Severity: blocker Version: 6.2
Component: Widgets Keywords: php8
Focuses: Cc:

Description (last modified by sabernhardt)

With php7.4 all was smooth, with php8.0 there is this nasty error:

call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method WP_Widget_MiniMeta::register() cannot be called statically

I inactivated any plugin and I removed any themes but 2014 it did not help. Then I installed 2023, activated it but the error was still there. The MiniMeta-Widget is active and seems to be the source of the error. Unfortunate (?) I am not a programmer there I will not deal with MiniMeta.

Change History (4)

#1 @sabernhardt
19 months ago

  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Severity changed from blocker to normal
  • Status changed from new to closed

Hi and welcome to WordPress Core Trac!

Yes, the MiniMeta Widget plugin should be the source of that error. Someone else reported the same error.

Since the plugin has not been in active development for years, I can only recommend trying to find another plugin that would do what you need. If you want help with the search, you could open a topic on the WordPress.org support forums:

#2 follow-up: @urseetaeler
19 months ago

  • Resolution invalid deleted
  • Severity changed from normal to blocker
  • Status changed from closed to reopened

When I eleminated the MiniMeta Widget, with php8.0 another error disabled my website:

ArgumentCountError thrown

Too few arguments to function WP_Widget::__construct(), 0 passed in /mnt/web113/a2/26/52367426/htdocs/urseetalnet/newwp/wp-includes/class-wp-widget-factory.php on line 62 and at least 2 expected


Renaming this class-wp-widget-factory.php disabled login without showing any error.

#3 @sabernhardt
19 months ago

  • Keywords php8 added
  • Milestone set to Awaiting Review

#4 in reply to: ↑ 2 @SergeyBiryukov
19 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

Replying to urseetaeler:

When I eleminated the MiniMeta Widget, with php8.0 another error disabled my website:

ArgumentCountError thrown

Too few arguments to function WP_Widget::__construct(), 0 passed in wp-includes/class-wp-widget-factory.php on line 62 and at least 2 expected

Thanks for the report! We're already tracking this issue in #56127.

Note: See TracTickets for help on using tickets.