Don't floatval matches 0 and remove v from zip name

This commit is contained in:
mattpass
2020-11-22 16:52:15 +00:00
parent 116c82736f
commit bb2580c031
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ if (true === $ICEcoder["checkUpdates"]) {
}
$icvInfo = str_replace("\n", "", $icvData);
$icv = preg_match("/^[0-9.]+/", $icvInfo, $matches);
$icv = floatval($matches[0]);
$icv = $matches[0];
$icvInfo = [
0 => $icv,
1 => substr($icvInfo, strlen($matches[0]))

View File

@@ -85,7 +85,7 @@ function openZipNew($icvInfo) {
$source = 'ICEcoder '.$icvInfo;
$target = '../';
$remoteFile = 'https://icecoder.net/ICEcoder-v'.(str_replace(" beta", "-beta",$icvInfo)).'.zip';
$remoteFile = 'https://icecoder.net/ICEcoder-'.(str_replace(" beta", "-beta",$icvInfo)).'.zip';
$file = "../tmp/new-version.zip";
$fileData = getData($remoteFile,'curl','Sorry, couldn\'t get latest version zip file.');
echo 'Storing zip file...<br>';