Skip to content

Commit cc67669

Browse files
committed
Check existence of index to avoid notice
1 parent dd0ac8f commit cc67669

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DB_Command.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,10 @@ public function query( $args, $assoc_args ) {
431431
$assoc_args['execute'] = $args[0];
432432
}
433433

434-
// Ensure that the SQL mode is compatible with WPDB.
435-
$assoc_args['execute'] = $this->get_sql_mode_query( $assoc_args ) . $assoc_args['execute'];
434+
if ( isset( $assoc_args['execute'] ) ) {
435+
// Ensure that the SQL mode is compatible with WPDB.
436+
$assoc_args['execute'] = $this->get_sql_mode_query( $assoc_args ) . $assoc_args['execute'];
437+
}
436438

437439
self::run( $command, $assoc_args );
438440
}

0 commit comments

Comments
 (0)