Make WordPress Core


Ignore:
Timestamp:
02/02/2014 09:46:07 PM (11 years ago)
Author:
nacin
Message:

Throw an incorrect usage notice when the query argument of wpdb::prepare() does not include a placeholder.

props ounziw.
fixes #25604.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r27072 r27073  
    10531053        if ( is_null( $query ) )
    10541054            return;
     1055
     1056        if ( strpos( $query, '%' ) === false ) {
     1057            _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9' );
     1058        }
    10551059
    10561060        $args = func_get_args();
Note: See TracChangeset for help on using the changeset viewer.