diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index 5cc2be114f..c300e240f2 100644 --- a/src/wp-includes/wp-db.php +++ b/src/wp-includes/wp-db.php @@ -1243,7 +1243,7 @@ class wpdb { } foreach ( $args as $arg ) { - if ( ! is_scalar( $arg ) ) { + if ( ! is_scalar( $arg ) && ! is_null( $arg ) ) { _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'Unsupported value type (%s).' ), gettype( $arg ) ), '4.8.2' ); } }