PHP Notice: Object of class WP_Error could not be converted to int in /var/www/vhosts/hayhauler.co/httpdocs/wp-includes/functions.php on line 2568, referer: http://hayhauler.co/
我甚至不知道从哪里开始,也不知道该问什么问题。我知道这会阻止我使用以下方法将某些信息发布到数据库中:
$wpdb->query($wpdb->prepare(
"
INSERT INTO $wpdb->quotes
(user_ID,origin,destination,broker_ID,quote_ID,estimatedship)
VALUES (%d,%s,%s,%d,%s,%s)
",
$user_id,
$origin,
$destination,
$brokerID,
$brokerID.\'-\'.genRandomString(),
$estimatedship
));
然后出现以下错误:
mysql_real_escape_string() expects parameter 1 to be string, object given in /var/www/vhosts/hayhauler.co/httpdocs/wp-includes/wp-db.php on line 789, referer: http://hayhauler.co/
任何帮助或指导都将不胜感激。