mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-24 12:09:02 -05:00
Fix Attempt to read property "size" on null in AutoPreWarning
This commit is contained in:
@@ -60,6 +60,12 @@ class AutoPreWarning extends Command
|
||||
->get();
|
||||
|
||||
foreach ($prewarn as $pre) {
|
||||
// Skip Prewarning if Torrent is NULL
|
||||
// e.g. Torrent has been Rejected by a Moderator after it has been downloaded and not deleted
|
||||
if (is_null($pre->torrent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! $pre->user->group->is_immune && $pre->actual_downloaded > ($pre->torrent->size * (\config('hitrun.buffer') / 100))) {
|
||||
$exsist = Warning::withTrashed()
|
||||
->where('torrent', '=', $pre->torrent->id)
|
||||
|
||||
Reference in New Issue
Block a user