我的网站上出现此错误: mysqli_real_escape_string()期望参数2为字符串,在/home/clients/e511b4b37ae7765d6c8d867c61082084/web/wp-includes/wp-db.php第1165行中给出的数组
wp-include上的代码正确:
enter code here
function _real_escape( $string ) {
if ( $this->dbh ) {
if ( $this->use_mysqli ) {
$escaped = mysqli_real_escape_string( $this->dbh, $string );
} else {
$escaped = mysql_real_escape_string( $string, $this->dbh );
}
} else {
$class = get_class( $this );
if ( function_exists( '__' ) ) {
/* translators: %s: Database access abstraction class, usually wpdb or a class extending wpdb. */
_doing_it_wrong( $class, sprintf( __( '%s must set a database connection for use with escaping.' ), $class ), '3.6.0' );
} else {
_doing_it_wrong( $class, sprintf( '%s must set a database connection for use with escaping.', $class ), '3.6.0' );
}
$escaped = addslashes( $string );
}
return $this->add_placeholder_escape( $escaped );
}
如何解决? 非常感谢