Index: src/wp-includes/class-wp-customize-manager.php
===================================================================
--- src/wp-includes/class-wp-customize-manager.php	(revision 39346)
+++ src/wp-includes/class-wp-customize-manager.php	(working copy)
@@ -4076,34 +4076,44 @@
 	 * @return string|WP_Error Background value or validation error.
 	 */
 	public function _sanitize_background_setting( $value, $setting ) {
-		if ( 'background_repeat' === $setting->id ) {
-			if ( ! in_array( $value, array( 'repeat-x', 'repeat-y', 'repeat', 'no-repeat' ) ) ) {
-				return new WP_Error( 'invalid_value', __( 'Invalid value for background repeat.' ) );
-			}
-		} elseif ( 'background_attachment' === $setting->id ) {
-			if ( ! in_array( $value, array( 'fixed', 'scroll' ) ) ) {
-				return new WP_Error( 'invalid_value', __( 'Invalid value for background attachment.' ) );
-			}
-		} elseif ( 'background_position_x' === $setting->id ) {
-			if ( ! in_array( $value, array( 'left', 'center', 'right' ), true ) ) {
-				return new WP_Error( 'invalid_value', __( 'Invalid value for background position X.' ) );
-			}
-		} elseif ( 'background_position_y' === $setting->id ) {
-			if ( ! in_array( $value, array( 'top', 'center', 'bottom' ), true ) ) {
-				return new WP_Error( 'invalid_value', __( 'Invalid value for background position Y.' ) );
-			}
-		} elseif ( 'background_size' === $setting->id ) {
-			if ( ! in_array( $value, array( 'auto', 'contain', 'cover' ), true ) ) {
-				return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) );
-			}
-		} elseif ( 'background_preset' === $setting->id ) {
-			if ( ! in_array( $value, array( 'default', 'fill', 'fit', 'repeat', 'custom' ), true ) ) {
-				return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) );
-			}
-		} elseif ( 'background_image' === $setting->id || 'background_image_thumb' === $setting->id ) {
-			$value = empty( $value ) ? '' : esc_url_raw( $value );
-		} else {
-			return new WP_Error( 'unrecognized_setting', __( 'Unrecognized background setting.' ) );
+		switch( $setting->id ) {
+			case 'background_repeat':
+				if ( ! in_array( $value, array( 'repeat-x', 'repeat-y', 'repeat', 'no-repeat' ) ) ) {
+					return new WP_Error( 'invalid_value', __( 'Invalid value for background repeat.' ) );
+				}
+				break;
+			case 'background_attachment':
+				if ( ! in_array( $value, array( 'fixed', 'scroll' ) ) ) {
+					return new WP_Error( 'invalid_value', __( 'Invalid value for background attachment.' ) );
+				}
+				break;
+			case  'background_position_x':
+				if ( ! in_array( $value, array( 'left', 'center', 'right' ), true ) ) {
+					return new WP_Error( 'invalid_value', __( 'Invalid value for background position X.' ) );
+				}
+				break;
+			case  'background_position_y':
+				if ( ! in_array( $value, array( 'top', 'center', 'bottom' ), true ) ) {
+					return new WP_Error( 'invalid_value', __( 'Invalid value for background position Y.' ) );
+				}
+				break;
+			case  'background_size':
+				if ( ! in_array( $value, array( 'auto', 'contain', 'cover' ), true ) ) {
+					return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) );
+				}
+				break;
+			case  'background_preset':
+				if ( ! in_array( $value, array( 'default', 'fill', 'fit', 'repeat', 'custom' ), true ) ) {
+					return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) );
+				}
+				break;
+			case 'background_image':
+			case 'background_image_thumb':
+				$value = empty( $value ) ? '' : esc_url_raw( $value );
+				break;
+			default:
+				return new WP_Error( 'unrecognized_setting', __( 'Unrecognized background setting.' ) );
+				break;
 		}
 		return $value;
 	}
