Ticket #22873: 22873.diff
File 22873.diff, 1.8 KB (added by , 11 years ago) |
---|
-
wp-includes/wp-db.php
987 987 * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string 988 988 * if there was something to prepare 989 989 */ 990 function prepare( $query, $args ) {990 function prepare( $query, $args = null ) { 991 991 if ( is_null( $query ) ) 992 992 return; 993 993 994 if ( is_null( $args ) ) 995 _doing_it_wrong( __METHOD__, sprintf( __( 'The %s parameter should not be empty.' ), '<code>$args</code>' ), '3.5' ); 996 994 997 $args = func_get_args(); 995 998 array_shift( $args ); 996 999 // If args were passed as an array (as in vsprintf), move them up -
wp-includes/functions.php
2939 2939 2940 2940 // Allow plugin to filter the output error trigger 2941 2941 if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) { 2942 global $wp_version; 2942 2943 $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version ); 2943 2944 $message .= ' ' . __( 'Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' ); 2944 trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) ); 2945 2946 $error_type = E_USER_NOTICE; 2947 if ( false !== strpos( $wp_version, '-alpha' ) ) 2948 $error_type = E_USER_ERROR; 2949 elseif ( false !== strpos( $wp_version, '-beta' ) ) 2950 $error_type = E_USER_WARNING; 2951 2952 trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ), $error_type ); 2945 2953 } 2946 2954 } 2947 2955