mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
优化跳转页面对php8.1的兼容
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user