Make WordPress Core


Ignore:
Timestamp:
12/27/2012 04:44:17 PM (13 years ago)
Author:
nacin
Message:

In 3.5.1, have $wpdb->prepare() issue a notice for an insufficient number of arguments, instead of a warning. see #22873.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5/wp-includes/wp-db.php

    r22429 r23215  
    988988     *  if there was something to prepare
    989989     */
    990     function prepare( $query, $args ) {
     990    function prepare( $query, $args = null ) {
    991991        if ( is_null( $query ) )
    992992            return;
     993
     994        if ( func_num_args() < 2 )
     995            _doing_it_wrong( 'wpdb::prepare', sprintf( 'wpdb::prepare() requires at least two arguments.' ), '3.5' );
    993996
    994997        $args = func_get_args();
Note: See TracChangeset for help on using the changeset viewer.