From 467efee656efcc99494311e9b79d72bffa7e2a56 Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Sat, 3 Dec 2022 12:20:41 -0800 Subject: [PATCH] Fix misbehaving isPreviewVersion() --- src/library/Box/Update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/Box/Update.php b/src/library/Box/Update.php index 611244364..13361f776 100644 --- a/src/library/Box/Update.php +++ b/src/library/Box/Update.php @@ -49,7 +49,7 @@ class Box_Update */ public function isPreviewVersion(){ $reg = '^(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?: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[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;