5.0.0 - 普通 - 未处理
$fields = $this->getFields();// 检查非数据字段
if (!empty($fields)) {
foreach ($data as $key => $val) {
if (!in_array($key, $fields, true)) {
if (Config::get('db_fields_strict')) {
throw new Exception(' fields not exists :[ ' . $key . ' ]');
}
unset($data[$key]);
} elseif (is_scalar($val) && !isset($this->options['bind'][$key])) {
// 字段类型检查
$this->_parseType($data, $key, $this->options['bind']);
}
}
}
// 安全过滤
if (!empty($this->options['filter'])) {
$data = array_map($this->options['filter'], $data);
unset($this->options['filter']);
}
这里检查非数据字段后还没到安全过滤就报错了,过滤到底咋用??
