Skip to content

Commit

Permalink
Regex of the validateVersion method of class Plugin modified to match…
Browse files Browse the repository at this point in the history
… every possible version string of the current list of versions of Advanced Custom Fields
  • Loading branch information
alvaromartinezmajado committed Nov 20, 2018
1 parent 772cec9 commit 3275430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ACFProInstaller/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected function validateVersion($version)
{
// \A = start of string, \Z = end of string
// See: http://stackoverflow.com/a/34994075
$major_minor_patch_optional = '/\A\d\.\d\.\d{1,2}(?:\.\d)?\Z/';
$major_minor_patch_optional = '/\A\d\.\d\.\d{1,2}(?:\.\d)?(?:\-(dev|beta|RC)?(\d{1,2})?)?\Z/';

if (!preg_match($major_minor_patch_optional, $version)) {
throw new \UnexpectedValueException(
Expand Down

0 comments on commit 3275430

Please sign in to comment.