parent
25e8cece3c
commit
cf2566d1d3
|
@ -479,14 +479,14 @@ function psm_update_available() {
|
|||
// extract latest version from Github.
|
||||
preg_match('/"tag_name":"[v](([\d][.][\d][.][\d])(-?\w*))"/', $latest, $latest);
|
||||
// add latest version to database
|
||||
if ($latest[2] !== false && strlen($latest[2]) < 15) {
|
||||
if (!empty($latest) && strlen($latest[2]) < 15) {
|
||||
psm_update_conf('version_update_check', $latest[2]);
|
||||
}
|
||||
} else {
|
||||
$latest[2] = psm_get_conf('version_update_check');
|
||||
}
|
||||
|
||||
if ($latest[2] !== false) {
|
||||
if (!empty($latest)) {
|
||||
$current = psm_get_conf('version');
|
||||
return version_compare($latest[2], $current, '>');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue