From 78923177f978305978e6ee0bc13191b4616ea86e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 Oct 2018 16:46:27 +0100 Subject: [PATCH] VersionString: use appropriate regex for number matching --- src/pocketmine/utils/VersionString.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/utils/VersionString.php b/src/pocketmine/utils/VersionString.php index 4c512f47d..51757a872 100644 --- a/src/pocketmine/utils/VersionString.php +++ b/src/pocketmine/utils/VersionString.php @@ -55,7 +55,7 @@ class VersionString{ $this->development = $isDevBuild; $this->build = $buildNumber; - preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)(?:-(.*))?$/', $this->baseVersion, $matches); + preg_match('/(\d+)\.(\d+)\.(\d+)(?:-(.*))?$/', $this->baseVersion, $matches); if(count($matches) < 4){ throw new \InvalidArgumentException("Invalid base version \"$baseVersion\", should contain at least 3 version digits"); }