Getting error on page: Missing argument 2 for wpdb::prepare()…
-
Warning: Missing argument 2 for wpdb::prepare(), called in /nfs/c04/h03/mnt/63027/domains/dreamtrampoline.com/html/sandbox/shibui/wp-content/plugins/post-types-order/post-types-order.php on line 191 and defined in /nfs/c04/h03/mnt/63027/domains/dreamtrampoline.com/html/sandbox/shibui/wp-includes/wp-db.php on line 990
This error won’t go away even if I disable all other plugins. Is there something I can do to fix the problem? My line 990 on the wp-db.php is the following:
function prepare( $query, $args ) {
if ( is_null( $query ) )
return;$args = func_get_args();
array_shift( $args );
// If args were passed as an array (as in vsprintf), move them up
if ( isset( $args[0] ) && is_array($args[0]) )
$args = $args[0];
$query = str_replace( “‘%s'”, ‘%s’, $query ); // in case someone mistakenly already singlequoted it
$query = str_replace( ‘”%s”‘, ‘%s’, $query ); // doublequote unquoting
$query = preg_replace( ‘|(?<!%)%f|’ , ‘%F’, $query ); // Force floats to be locale unaware
$query = preg_replace( ‘|(?<!%)%s|’, “‘%s'”, $query ); // quote the strings, avoiding escaped strings like %%s
array_walk( $args, array( $this, ‘escape_by_ref’ ) );
return @vsprintf( $query, $args );
}
- The topic ‘Getting error on page: Missing argument 2 for wpdb::prepare()…’ is closed to new replies.