diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index aa4cb4f0..ed948d2e 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -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 {