[wp-trac] [WordPress Trac] #42040: `$wpdb->prepare` returns blank without notice if less number of arguments are passed. should give a notice or exception
WordPress Trac
noreply at wordpress.org
Mon Oct 2 02:10:16 UTC 2017
#42040: `$wpdb->prepare` returns blank without notice if less number of arguments
are passed. should give a notice or exception
--------------------------------------+---------------------
Reporter: thekt12 | Owner: pento
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.9
Component: Database | Version: 4.8.2
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Changes (by pento):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"41662"]:
{{{
#!CommitTicketReference repository="" revision="41662"
Database: Throw a notice if `wpdb::prepare()` is called with an incorrect
number of arguments
`wpdb::prepare()` currently gives no information if the number of
arguments passed doesn't match the number of placeholders in the query.
This change gives an explicit notice that the call was incorrect.
Also fixes an enrelated term meta test that was triggering this new
notice.
Props thekt12 for the initial patch.
Fixes #42040.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42040#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list