diff --git wp-includes/wp-db.php wp-includes/wp-db.php
index 2ec3312c4..2f4d4a994 100644
--- wp-includes/wp-db.php
+++ wp-includes/wp-db.php
@@ -1320,7 +1320,7 @@ class wpdb {
 
 		// If args were passed as an array (as in vsprintf), move them up.
 		$passed_as_array = false;
-		if ( is_array( $args[0] ) && count( $args ) === 1 ) {
+		if ( isset( $args[0] ) && is_array( $args[0] ) && count( $args ) === 1 ) {
 			$passed_as_array = true;
 			$args            = $args[0];
 		}
