问题描述
希望有人可以指导我,我尝试了google,但我仍然迷路。我尝试了strval
,但仍然遇到相同的错误。 $structure_code
例如22334455
add_filter( 'gform_field_value_construction_company','populate_site_client' );
function populate_site_client($value) {
$structure_code = strval($_GET['structure_code']);
echo gettype($structure_code);
$structure_id = get_page_by_title($structure_code,OBJECT,'structures');
return $structure_id;
}
添加此代码时,出现错误:
Object of class WP_Post could not be converted to string in /home/scaffaudit/public_html/wp-includes/formatting.php on line 1098
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)