Make WordPress Core


Ignore:
Timestamp:
10/02/2017 02:10:14 AM (8 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/meta.php

    r40916 r41662  
    359359        register_taxonomy( 'wptests_tax', 'post' );
    360360        $t1 = wp_insert_term( 'Foo', 'wptests_tax' );
    361         add_term_meta( $t1, 'foo', 'bar' );
     361        add_term_meta( $t1['term_id'], 'foo', 'bar' );
    362362
    363363        register_taxonomy( 'wptests_tax_2', 'post' );
Note: See TracChangeset for help on using the changeset viewer.