优化跳转页面对php8.1的兼容

This commit is contained in:
2022-09-27 17:04:00 +08:00
parent 81a90fe49a
commit f54123e216

View File

@@ -41,6 +41,11 @@ trait JumpTrait
$type = $this->getResponseType();
if ($type == 'html') {
if (is_null($result['url'])) {
$result['url'] = '';
}
$response = view(app('config')->get('app.dispatch_success_tmpl'), $result);
} elseif ($type == 'json') {
$response = json($result);
@@ -76,6 +81,9 @@ trait JumpTrait
'wait' => $wait,
];
if ($type == 'html') {
if (is_null($result['url'])) {
$result['url'] = '';
}
$response = view(app('config')->get('app.dispatch_error_tmpl'), $result);
} elseif ($type == 'json') {
$response = json($result);