Commit eef1a6c8 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

Merge branch '541-do-not-allow-to-upload-extensions-with-invalid-versions' of...

Merge branch '541-do-not-allow-to-upload-extensions-with-invalid-versions' of ssh://gitlab.typo3.org:2222/services/t3o-sites/extensions.typo3.org/ter into 541-do-not-allow-to-upload-extensions-with-invalid-versions
parents d76c07ed 9d3d276b
Pipeline #20470 passed with stages
in 6 minutes and 37 seconds
......@@ -99,7 +99,7 @@ class ExtensionVersion
*/
public function isValidVersionNumber(): bool
{
return preg_match('/^(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})$/', $this->version) !== false;
return (bool)preg_match('/^(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})$/', $this->version);
// alternative (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $version) !== false) {
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment