mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
Merge pull request #355 from yovei/master
基于\think\Exception 才使用 getHttpStatus 方法
This commit is contained in:
@@ -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');
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
// 分析表达式
|
// 分析表达式
|
||||||
|
|||||||
Reference in New Issue
Block a user