[英]Fatal error: Cannot use string offset as an array in meta.php on line 43
Fatal error: Cannot use string offset as an array in /home/content/51/6183951/html/triadss/wp-content/themes/smartbox-installable/lib/functions/meta.php on line 43
Kindly solve this issue!!!! 请解决这个问题!!!
meta.php on line 43 starts with " array_push " 第43行的meta.php以“ array_push ”开头
function get_des_templates($type)
{
global $wpdb;
$q = "SELECT * from ".$wpdb->prefix."options WHERE option_name LIKE 'des_template_[$type]_%'";
$res = $wpdb->get_results($q, ARRAY_A);
$output = array();
foreach($res as $r)
{
$options = unserialize(trim($r['option_value']));
if (is_string($options))
{
$options = unserialize($options);
}
array_push($output, array("id"=>$options['des_template_tab']['name'], "name"=>$options['des_template_tab']['nicename']));
}
return $output;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.