fix details user not exists

This commit is contained in:
xiaomlove
2022-03-14 12:10:54 +08:00
parent 24a2af151e
commit 8b721ac825
+4 -1
View File
@@ -38,7 +38,10 @@ if (!$row) {
) { ) {
permissiondenied(); permissiondenied();
} else { } else {
$owner = \App\Models\User::query()->with(['valid_medals'])->findOrFail($row['owner']); $owner = \App\Models\User::query()->with(['valid_medals'])->find($row['owner']);
if (!$owner) {
$owner = \App\Models\User::defaultUser();
}
$torrentRep = new \App\Repositories\TorrentRepository(); $torrentRep = new \App\Repositories\TorrentRepository();
$torrentUpdate = []; $torrentUpdate = [];
if (!empty($_GET["hit"])) { if (!empty($_GET["hit"])) {