Database: Use numbered placeholders in error message in wpdb::prepare().

Props tobifjellner.
Fixes #42142.

Built from https://develop.svn.wordpress.org/trunk@41789


git-svn-id: http://core.svn.wordpress.org/trunk@41623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2017-10-08 09:18:57 +00:00
parent a01ae9a8c3
commit 1478135c46
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta1-41788';
$wp_version = '4.9-beta1-41789';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -1261,7 +1261,7 @@ class wpdb {
if ( count ( $args ) !== $placeholders ) {
wp_load_translations_early();
_doing_it_wrong( 'wpdb::prepare',
sprintf( __( 'The query does not contain the correct number of placeholders (%d) for the number of arguments passed (%d).' ),
sprintf( __( 'The query does not contain the correct number of placeholders (%1$d) for the number of arguments passed (%2$d).' ),
$placeholders,
count( $args ) ),
'4.9.0'