Merge pull request #521 from BelleNottelling/fix-update-msg

Fix misbehaving isPreviewVersion()
This commit is contained in:
Belle Aerni authored and GitHub committed 2022-12-03 12:28:54 -08:00
commit 3d3fce9978
1 file changed
+1 -1
+1 -1
View File
@@ -49,7 +49,7 @@ class Box_Update
*/
public function isPreviewVersion(){
$reg = '^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$^';
if(preg_match($reg, $this->getLatestVersion) === '0'){
if(preg_match($reg, $this->getLatestVersion())){
return false;
} else {
return true;