Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 7cc304d

Browse files
authored
Fixed sending notifications if the server is deleted (#288)
1 parent f64cef1 commit 7cc304d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

system/library/cron/notice_server_overdue.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ public function __construct()
3131
$sql->query('SELECT `mail` FROM `users` WHERE `id`="' . $server['user'] . '" LIMIT 1');
3232
$user = $sql->get();
3333

34+
if (!$user) {
35+
exit;
36+
}
37+
3438
$server_address = $server['address'] . ':' . $server['port'];
3539

3640
if (!sys::mail('Аренда сервера', sys::updtext(sys::text('mail', 'notice_server_overdue'), ['site' => $cfg['name'], 'id' => $server['id'], 'address' => $server_address]), $user['mail'])) {

0 commit comments

Comments
 (0)