diff --git a/library/includes/datastore/build_check_updates.php b/library/includes/datastore/build_check_updates.php index a990d4364..be12a3d22 100644 --- a/library/includes/datastore/build_check_updates.php +++ b/library/includes/datastore/build_check_updates.php @@ -18,9 +18,16 @@ if (!$bb_cfg['tp_updater_settings']['enabled']) { } $data = []; +$data[] = ['latest_check_timestamp' => TIMENOW]; -$updaterDownloader = new \TorrentPier\Updater(); -$updaterDownloader = $updaterDownloader->getLastVersion($bb_cfg['tp_updater_settings']['allow_pre_releases']); +try { + $updaterDownloader = new \TorrentPier\Updater(); + $updaterDownloader = $updaterDownloader->getLastVersion($bb_cfg['tp_updater_settings']['allow_pre_releases']); +} catch (Exception $exception) { + bb_log('[Updater] Exception: ' . $exception->getMessage() . LOG_LF); + $this->store('check_updates', $data); + return; +} $getVersion = \TorrentPier\Helpers\VersionHelper::removerPrefix($updaterDownloader['tag_name']); $currentVersion = \TorrentPier\Helpers\VersionHelper::removerPrefix($bb_cfg['tp_version']); @@ -58,5 +65,4 @@ if (\z4kn4fein\SemVer\Version::greaterThan($getVersion, $currentVersion)) { ]; } -$data[] = ['latest_check_timestamp' => TIMENOW]; $this->store('check_updates', $data); diff --git a/library/includes/functions.php b/library/includes/functions.php index dde48be28..c222ecc39 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -2229,10 +2229,10 @@ function infoByIP(string $ipAddress, int $port = 0): array ]; } } else { - bb_log("[FreeIPAPI] Failed to get IP info for: $ipAddress"); + bb_log("[FreeIPAPI] Failed to get IP info for: $ipAddress" . LOG_LF); } } catch (Exception $e) { - bb_log("[FreeIPAPI] " . $e->getMessage()); + bb_log("[FreeIPAPI] " . $e->getMessage() . LOG_LF); } if (empty($data)) {