diff --git a/wp-admin/options.php b/wp-admin/options.php index 019f9529c4..84ac775fd4 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -57,12 +57,17 @@ if ( ! current_user_can( $capability ) ) { if ( ! empty( $_GET['adminhash'] ) ) { $new_admin_details = get_option( 'adminhash' ); $redirect = 'options-general.php?updated=false'; - if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details['hash'], $_GET['adminhash'] ) && ! empty( $new_admin_details['newemail'] ) ) { + + if ( is_array( $new_admin_details ) + && hash_equals( $new_admin_details['hash'], $_GET['adminhash'] ) + && ! empty( $new_admin_details['newemail'] ) + ) { update_option( 'admin_email', $new_admin_details['newemail'] ); delete_option( 'adminhash' ); delete_option( 'new_admin_email' ); $redirect = 'options-general.php?updated=true'; } + wp_redirect( admin_url( $redirect ) ); exit; } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' === $_GET['dismiss'] ) { @@ -73,7 +78,7 @@ if ( ! empty( $_GET['adminhash'] ) ) { exit; } -if ( is_multisite() && ! current_user_can( 'manage_network_options' ) && 'update' != $action ) { +if ( is_multisite() && ! current_user_can( 'manage_network_options' ) && 'update' !== $action ) { wp_die( '
' . __( 'Sorry, you are not allowed to delete these items.' ) . '
', @@ -183,7 +188,9 @@ if ( ! is_multisite() ) { * or upload_path is not the default ('wp-content/uploads' or empty), * they can be edited, otherwise they're locked. */ - if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) { + if ( get_option( 'upload_url_path' ) + || get_option( 'upload_path' ) && 'wp-content/uploads' !== get_option( 'upload_path' ) + ) { $allowed_options['media'][] = 'upload_path'; $allowed_options['media'][] = 'upload_url_path'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 99fba1e0e8..4b416e21fe 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-beta4-52430'; +$wp_version = '5.9-beta4-52431'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.