/** * 输出错误 * * @param string $code 错误编码 * @param string $msg 错误消息 * @param string $name 值名称 * @param array $option * @param bool $strict 是否严格模式 * * @return null */ private static function error($code, $msg, $name, array $option, $strict) { $field = isset($option['_desc']) ? $name . ':' . $option['_desc'] : $name; $line = isset($option['_line']) ? ' At line: ' . $option['_line'] : ''; $msg = '[' . $field . '] ' . $msg . '.' . $line; if ($strict) { Error::msg('inputIll', $msg, ['field' => $name, 'code' => $code]); } elseif (RUN_MODE !== 'production') { Error::notice('inputIll', $msg); } return null; }