mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
VersionString: added missing start anchor to regex
This commit is contained in:
parent
a6b5cddd5a
commit
df2c3136c9
@ -52,7 +52,7 @@ class VersionString{
|
||||
$this->development = $isDevBuild;
|
||||
$this->build = $buildNumber;
|
||||
|
||||
preg_match('/(\d+)\.(\d+)\.(\d+)(?:-(.*))?$/', $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