Skip to content

Commit 3275430

Browse files
Regex of the validateVersion method of class Plugin modified to match every possible version string of the current list of versions of Advanced Custom Fields
1 parent 772cec9 commit 3275430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ACFProInstaller/Plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ protected function validateVersion($version)
184184
{
185185
// \A = start of string, \Z = end of string
186186
// See: http://stackoverflow.com/a/34994075
187-
$major_minor_patch_optional = '/\A\d\.\d\.\d{1,2}(?:\.\d)?\Z/';
187+
$major_minor_patch_optional = '/\A\d\.\d\.\d{1,2}(?:\.\d)?(?:\-(dev|beta|RC)?(\d{1,2})?)?\Z/';
188188

189189
if (!preg_match($major_minor_patch_optional, $version)) {
190190
throw new \UnexpectedValueException(

0 commit comments

Comments
 (0)