mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 19:34:15 +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->development = $isDevBuild;
|
||||||
$this->build = $buildNumber;
|
$this->build = $buildNumber;
|
||||||
|
|
||||||
preg_match('/(\d+)\.(\d+)\.(\d+)(?:-(.*))?$/', $this->baseVersion, $matches);
|
preg_match('/^(\d+)\.(\d+)\.(\d+)(?:-(.*))?$/', $this->baseVersion, $matches);
|
||||||
if(count($matches) < 4){
|
if(count($matches) < 4){
|
||||||
throw new \InvalidArgumentException("Invalid base version \"$baseVersion\", should contain at least 3 version digits");
|
throw new \InvalidArgumentException("Invalid base version \"$baseVersion\", should contain at least 3 version digits");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user