Dashboard plugin UI critical error with PHP 8

[ad_1]

Hello! We recently upgraded from PHP 7.3 to 8.0.27, running WP 6.2. We have several sites using this plugin and they are still working fine on the public-facing side. I went to the plugin menu in the dashboard to edit something, and when I try to view the Add/Edit Post Types or Add/Edit Taxonomies pages in the dashboard I get the critical error below. (I can view the Registered Types/Taxes page okay.) Thanks for your help!

Warning: foreach() argument must be of type array|object, bool given in /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wp-content/plugins/custom-post-type-ui/inc/utility.php on line 536

Fatal error: Uncaught TypeError: shuffle(): Argument #1 ($array) must be of type array, bool given in /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wp-content/plugins/custom-post-type-ui/inc/utility.php:542 Stack trace: #0 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wp-content/plugins/custom-post-type-ui/inc/utility.php(542): shuffle() #1 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php(308): cptui_randomize_ads() #2 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wp-content/plugins/custom-post-type-ui/inc/utility.php(483): apply_filters() #4 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wp-content/plugins/custom-post-type-ui/inc/utility.php(345): cptui_get_ads() #5 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php(308): cptui_products_sidebar() #6 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #7 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action() #8 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wp-content/plugins/custom-post-type-ui/inc/post-types.php(174): do_action() #9 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php(308): cptui_manage_post_types() #10 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #11 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action() #12 /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wordpress/wp-admin/admin.php(259): do_action() #13 {main} thrown in /var/www/www-test.floridamuseum.ufl.edu/wordpress/htdocs/wp-content/plugins/custom-post-type-ui/inc/utility.php on line 542

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer