Exception UnCaught TypeError updates per site

On the /wp-admin/admin.php?page=UpdatesManage&tab=themes-updates page I encountered this error:

The Updates per item did work, I edited the plugin file to add a null check on the line which was throwing the error. This seems to do the trick for now

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.4.3
Active theme: Twenty Twenty-Four (version 1.0)
Current plugin: MainWP Dashboard (version 5.0.1)
PHP version 8.2.11

Error Details

An error of type E_ERROR was caused in line 251 of the file /home/mainwp/public_html/wp-content/plugins/mainwp/pages/page-mainwp-updates-per-site.php. Error message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/mainwp/public_html/wp-content/plugins/mainwp/pages/page-mainwp-updates-per-site.php:251
Stack trace:
#0 /home/mainwp/public_html/wp-content/plugins/mainwp/pages/page-mainwp-updates-per-site.php(251): count()
#1 /home/mainwp/public_html/wp-content/plugins/mainwp/pages/page-mainwp-updates.php(1006): MainWP\Dashboard\MainWP_Updates_Per_Site::render_plugins_updates()
#2 /home/mainwp/public_html/wp-content/plugins/mainwp/pages/page-mainwp-updates.php(798): MainWP\Dashboard\MainWP_Updates::render_plugins_update_tab()
#3 /home/mainwp/public_html/wp-includes/class-wp-hook.php(324): MainWP\Dashboard\MainWP_Updates::render()
#4 /home/mainwp/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#5 /home/mainwp/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#6 /home/mainwp/public_html/wp-admin/admin.php(259): do_action()
#7 {main}
thrown

Hey @rob1998

Thanks for reporting this to us. I will check for more details with the development team.

In the mean time, can you try temporarily deactivating all plugins except for MainWP Dashboard and see if that helps?

And can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Info → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:

image

Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

Just to provide an update on this -

The development team has identified an issue and @rob1998 has confirmed the fix.

It will be included in the next release of MainWP Dashboard.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.