diff --git a/wp-admin/options.php b/wp-admin/options.php index 84ac775fd4..d63b10eb4f 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -255,7 +255,7 @@ if ( 'update' === $action ) { // We are saving settings sent from a settings pag 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 ( 'update' === $action ) { // We are saving settings sent from a settings pag if ( $user_language_old !== $user_language_new ) { load_default_textdomain( $user_language_new ); } + } else { + add_settings_error( 'general', 'settings_updated', __( 'Settings save failed.' ), 'error' ); } /* diff --git a/wp-includes/version.php b/wp-includes/version.php index 31663598ff..80a6a8c6e0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53150'; +$wp_version = '6.0-alpha-53151'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.