Make WordPress Core

Ticket #25604: check_first_argument_of_wpdb__prepare_has_a_placeholder4.patch

File check_first_argument_of_wpdb__prepare_has_a_placeholder4.patch, 655 bytes (added by ounziw, 11 years ago)
  • wp-includes/wp-db.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    992992        function prepare( $query, $args ) {
    993993                if ( is_null( $query ) )
    994994                        return;
    995 
     995                if ( strpos( $query, '%' ) === false ) {
     996                        _doing_it_wrong( 'wpdb::prepare', __( 'First argument of wpdb::prepare() should have a placeholder.' ), '3.9' );
     997                }
    996998                $args = func_get_args();
    997999                array_shift( $args );
    9981000                // If args were passed as an array (as in vsprintf), move them up