Commit 60bb2583 authored by wolfcode's avatar wolfcode

optimize code

parent 8a1a7b02
...@@ -77,7 +77,7 @@ class UploadService ...@@ -77,7 +77,7 @@ class UploadService
$oss_request_url = $_rs['oss - request - url'] ?? ''; $oss_request_url = $_rs['oss - request - url'] ?? '';
if (empty($oss_request_url)) return ['code' => 0, 'data' => '上传至OSS失败']; if (empty($oss_request_url)) return ['code' => 0, 'data' => '上传至OSS失败'];
$oss_request_url = str_replace('http://', 'https://', $oss_request_url); $oss_request_url = str_replace('http://', 'https://', $oss_request_url);
} catch (OssException | OssException $e) { } catch (OssException $e) {
return ['code' => 0, 'data' => $e->getMessage()]; return ['code' => 0, 'data' => $e->getMessage()];
} }
......
...@@ -77,7 +77,7 @@ class InstallCheck implements MiddlewareInterface ...@@ -77,7 +77,7 @@ class InstallCheck implements MiddlewareInterface
mysqli_query($conn, $query_sql); mysqli_query($conn, $query_sql);
} }
mysqli_close($conn); mysqli_close($conn);
@touch($base_path . 'install.lock'); @touch($lock_file);
return $handler($request); return $handler($request);
} catch (\Exception $e) { } catch (\Exception $e) {
$errorMsg = "连接 MySQL 失败: " . mysqli_connect_error() . $e->getMessage(); $errorMsg = "连接 MySQL 失败: " . mysqli_connect_error() . $e->getMessage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment