PHP Warning: strlen() expects parameter 1 to be string, array given in /var/Typecho/Validate.php on line 113
后台“基本设置”点击保存设置后的错误信息
后台“基本设置”点击保存设置后的错误信息
Re: 后台“基本设置”点击保存设置后的错误信息
就该是\var\Widget\Options\General.php这个文件中对数据保存验证时出错了。
/** 验证格式 */
if ($this->form()->validate()) {
$this->response->goBack();
}
$attachmentTypesOptions = array(
'@image@' => _t('图片文件') . ' <code>(gif jpg png tiff bmp)</code>',
'@media@' => _t('多媒体文件') . ' <code>(mp3 wmv wma rmvb rm avi flv)</code>',
'@doc@' => _t('常用档案文件') . ' <code>(txt doc docx xls xlsx ppt pptx zip rar pdf)</code>',
'@other@' => _t('其他格式 %s', ' <input type="text" class="w-50 text-s mono" name="attachmentTypesOther" value="' . htmlspecialchars($attachmentTypesOtherValue) . '" />'),
);
主要是验证这几个格式引起的。
/** 验证格式 */
if ($this->form()->validate()) {
$this->response->goBack();
}
$attachmentTypesOptions = array(
'@image@' => _t('图片文件') . ' <code>(gif jpg png tiff bmp)</code>',
'@media@' => _t('多媒体文件') . ' <code>(mp3 wmv wma rmvb rm avi flv)</code>',
'@doc@' => _t('常用档案文件') . ' <code>(txt doc docx xls xlsx ppt pptx zip rar pdf)</code>',
'@other@' => _t('其他格式 %s', ' <input type="text" class="w-50 text-s mono" name="attachmentTypesOther" value="' . htmlspecialchars($attachmentTypesOtherValue) . '" />'),
);
主要是验证这几个格式引起的。