Merge pull request #355 from yovei/master

基于\think\Exception 才使用 getHttpStatus 方法
This commit is contained in:
ThinkPHP
2016-03-06 20:54:08 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ class Error
*/ */
public static function output($exception, array $vars) public static function output($exception, array $vars)
{ {
http_response_code($exception instanceof \Exception ? $exception->getHttpStatus() : 500); http_response_code($exception instanceof \think\Exception ? $exception->getHttpStatus() : 500);
$type = Config::get('default_return_type'); $type = Config::get('default_return_type');

View File

@@ -366,7 +366,7 @@ class Model
{ {
// 数据处理 // 数据处理
$data = $this->_write_data($data, 'update'); $data = $this->_write_data($data, 'update');
if (false === $data) { if (false == $data) {
return false; return false;
} }
// 分析表达式 // 分析表达式