Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 23175)
+++ wp-includes/wp-db.php	(working copy)
@@ -987,10 +987,13 @@
 	 * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string
 	 * 	if there was something to prepare
 	 */
-	function prepare( $query, $args ) {
+	function prepare( $query, $args = null ) {
 		if ( is_null( $query ) )
 			return;
 
+		if ( is_null( $args ) )
+			_doing_it_wrong( __METHOD__, sprintf( __( 'The %s parameter should not be empty.' ), '<code>$args</code>' ), '3.5' );
+
 		$args = func_get_args();
 		array_shift( $args );
 		// If args were passed as an array (as in vsprintf), move them up
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 23175)
+++ wp-includes/functions.php	(working copy)
@@ -2939,9 +2939,17 @@
 
 	// Allow plugin to filter the output error trigger
 	if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
+		global $wp_version;
 		$version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
 		$message .= ' ' . __( 'Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' );
-		trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
+
+		$error_type = E_USER_NOTICE;
+		if ( false !== strpos( $wp_version, '-alpha' ) )
+			$error_type = E_USER_ERROR;
+		elseif ( false !== strpos( $wp_version, '-beta' ) )
+			$error_type = E_USER_WARNING;
+
+		trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ), $error_type );
 	}
 }
 
