diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php index 84ac775fd43d8..d63b10eb4fd52 100644 --- a/src/wp-admin/options.php +++ b/src/wp-admin/options.php @@ -255,7 +255,7 @@ if ( is_multisite() && ! current_user_can( 'manage_network_options' ) ) { wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) ); } - $options = explode( ',', wp_unslash( $_POST['page_options'] ) ); + $options = isset( $_POST['page_options'] ) ? explode( ',', wp_unslash( $_POST['page_options'] ) ) : null; } else { $options = $allowed_options[ $option_page ]; } @@ -332,6 +332,8 @@ if ( $user_language_old !== $user_language_new ) { load_default_textdomain( $user_language_new ); } + } else { + add_settings_error( 'general', 'settings_updated', __( 'Settings save failed.' ), 'error' ); } /*