[Plugin: WordPress SEO by Yoast] Bug in loading Default Blog Settings (multisite)
-
This bug causes the following error as many others have reported:
Fatal error: Cannot unset string offsets in ~\wwwroot\wp-content\plugins\wordpress-seo\admin\class-admin.php on line 440
There is a bug in the following code (class-admin.php lines 65-77):
function multisite_defaults() { $option = get_option( 'wpseo' ); if ( function_exists( 'is_multisite' ) && is_multisite() && !is_array( $option ) ) { $options = get_site_option( 'wpseo_ms' ); if ( is_array( $options ) && isset( $options['defaultblog'] ) && !empty( $options['defaultblog'] ) && $options['defaultblog'] != 0 ) { foreach ( get_wpseo_options_arr() as $option ) { update_option( $option, get_blog_option( $options['defaultblog'], $option ) ); } } $option['ms_defaults_set'] = true; update_option( 'wpseo', $option ); } }
The line
update_option( 'wpseo', $option );
updates the ‘wpseo’ option to a string “1pseo_social” which causes the error later on on line 440. To resolve this just add the line$option = get_option( 'wpseo' );
before$option['ms_defaults_set'] = true;
.
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘[Plugin: WordPress SEO by Yoast] Bug in loading Default Blog Settings (multisite)’ is closed to new replies.