请帮助我遇到麻烦,我有模型和错误,请帮助我
public function website_footer() {
$data = '';
$settings = $this->check_settings_exist(13);
if ($settings != false) {
$setting_details = $this->objectToArray(json_decode('[' . $settings . ']'));
$i = 1;
foreach ($setting_details[0] as $key => $value) {
if ($i == count($setting_details[0])) {
$data[$key] = $value;
} else {
$data[$key ] = $value;
}
++$i;
}
return $data;
} else {
return '';
}
}
错误:
遇到PHP错误
严重性:警告
消息:非法字符串偏移量'website_footer'
文件名:models / Write_setting_model.php
行号:97