mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-15 20:49:41 +01:00
Update p_check_update.php
This commit is contained in:
@@ -54,12 +54,13 @@ if ($current_smt == 'check')
|
||||
//get data from kleeja github repo
|
||||
if (! ($version_data = $cache->get('kleeja_repo_version')))
|
||||
{
|
||||
$version_data = [];
|
||||
|
||||
$github_data = FetchFile::make(KLEEJA_VERSION_CHECK_LINK)->setTimeOut(100)->get();
|
||||
|
||||
if (! empty($github_data))
|
||||
{
|
||||
$latest_release = json_decode($github_data, true);
|
||||
$version_data = null;
|
||||
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
{
|
||||
@@ -103,7 +104,7 @@ if ($current_smt == 'check')
|
||||
}
|
||||
|
||||
$data = [
|
||||
'version_number' => $version_data['version'],
|
||||
'version_number' => isset($version_data['version']) ? $version_data['version'] : null,
|
||||
'last_check' => time()
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user