From 1478135c4635e46295fb2f70298078edeb736db4 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sun, 8 Oct 2017 09:18:57 +0000 Subject: [PATCH] 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 --- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 126f25bc9e..009d911673 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 8787c991be..9759438a0c 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -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'