php7.1 报错 Error.php errcontext 7.1被废弃

浏览:857 发布日期:2017/09/12 分类:ThinkPHP5专区
#0 /data/website/leframe/thinkphp/library/think/Error.php(62): think\exception\ErrorException->__construct(2, 'Unknown: using ...', 'Unknown', 0, NULL)
#1 [internal function]: think\Error::appError(2, 'Unknown: using ...', 'Unknown', 0, NULL)
#2 {main}
thrown in /data/website/leframe/thinkphp/library/think/exception/ErrorException.php on line 38

经查询:
7.2.0 errcontext 被废弃。 使用此参数时会导致 E_DEPRECATED 提醒。
但是不知道为什么 7.1.9也报错 没说明这个参数不存在 但是按照提示的确是没有第五个参数
Error.php的部分代码:
/**
* Error Handler
* @param integer $errno 错误编号
* @param integer $errstr 详细错误信息
* @param string $errfile 出错的文件
* @param integer $errline 出错行号
* @param array $errcontext
* @throws ErrorException
*/
public static function appError($errno, $errstr, $errfile = '', $errline = 0, $errcontext = [])
{
$exception = new ErrorException($errno, $errstr, $errfile, $errline, $errcontext);
if (error_reporting() & $errno) {
// 将错误信息托管至 think\exception\ErrorException
throw $exception;
} else {
self::getExceptionHandler()->report($exception);
}
}

建议官方调整下
最佳答案
评论( 相关
后面还有条评论,点击查看>>