PHP Fatal error: PostTypeRegister.php:183 and TaxonomyRegister.php:189

[ad_1]

Hi,

I’ve been encountering an error that breaks some of the custom post types created by the Total theme on my site:

2024/08/20 15:38:22 [error] 1821340#1821340: *1033378 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/staging.flemingmartin.com/htdocs/wp-content/plugins/mb-custom-post-type/src/PostTypeRegister.php:183

2024/08/20 15:47:16 [error] 1821339#1821339: *1034838 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/staging.flemingmartin.com/htdocs/wp-content/plugins/mb-custom-post-type/src/TaxonomyRegister.php:189

I have disabled all other plugins and custom code on the website, except Meta Box plugins and the Total theme core plugin. So the issue is definitely a conflict between them. I was able to fix these two files by editing the if statements as follows:

PostTypeRegister.php, line 178: if ( defined( 'MBB_VER' ) && is_array( $settings ) && isset( $settings['slug'] ) )

TaxonomyRegister.php, line 183: if ( defined( 'MBB_VER' ) && is_array( $settings ) && isset( $settings['slug'] ) )

Would it be possible to have this fixed in the next release, please? Thank you!

 

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