Add try-catch to version check

This commit is contained in:
Cihan Şentürk 2025-07-21 15:20:05 +03:00 committed by GitHub
parent c059ad261c
commit 9f66fed1ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -84,7 +84,14 @@ class Versions
$versions = [];
// Check core first
$url = 'core/version/' . $info['akaunting'] . '/' . $info['php'] . '/' . $info['mysql'] . '/' . $info['companies'];
try {
$url = 'core/version/' . $info['akaunting'] . '/' . $info['php'] . '/' . $info['mysql'] . '/' . $info['companies'];
} catch (\Exception $e) {
// Handle exception
report($info, 'Error fetching core version');
return $versions;
}
# Installed modules start
$modules = Arr::wrap($modules);