mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
VersionString: use appropriate regex for number matching
This commit is contained in:
parent
b7062e7bff
commit
78923177f9
@ -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");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user