Index: src/wp-includes/class-wp-query.php
===================================================================
--- src/wp-includes/class-wp-query.php	(revision 42996)
+++ src/wp-includes/class-wp-query.php	(working copy)
@@ -1627,15 +1627,15 @@
 	 * @return string The sanitized 'order' query variable.
 	 */
 	protected function parse_order( $order ) {
-		if ( ! is_string( $order ) || empty( $order ) ) {
+		if (
+			! is_string( $order )
+			|| empty( $order )
+			|| 'ASC' !== strtoupper( $order )
+		) {
 			return 'DESC';
 		}
 
-		if ( 'ASC' === strtoupper( $order ) ) {
-			return 'ASC';
-		} else {
-			return 'DESC';
-		}
+		return 'ASC';
 	}
 
 	/**
