From 938d225f967d2d8444581dbd94f1da31369f82e1 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sun, 8 Oct 2017 09:17:57 +0000 Subject: [PATCH] Database: Use numbered placeholders in error message in `wpdb::prepare()`. Props tobifjellner. Fixes #42142. git-svn-id: https://develop.svn.wordpress.org/trunk@41789 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/wp-db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index 8787c991be..9759438a0c 100644 --- a/src/wp-includes/wp-db.php +++ b/src/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'