WordPress.org

Make WordPress Core

Ticket #25604: check_first_argument_of_wpdb__prepare_has_a_placeholder3.patch

File check_first_argument_of_wpdb__prepare_has_a_placeholder3.patch, 570 bytes (added by ounziw, 6 months 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                if ( strpos($query,'%') === false ) 
     996                        _doing_it_wrong( 'wpdb::prepare', 'First argument of wpdb::prepare() should have a placeholder.', '3.7' ); 
    995997 
    996998                $args = func_get_args(); 
    997999                array_shift( $args );