try { $insecure_project_version = ExtensionVersion::
createFromVersionString($insecure_version);
} catch (\UnexpectedValueException
$exception) { // An invalid version string should not halt the evaluation of valid
// versions in $insecure_versions. Version numbers that start with
// core prefix besides '8.x-' are allowed in $insecure_versions,
// but will never match and will throw an exception.
continue;
} if ($existing_project_version->
getMajorVersion() ===
$insecure_project_version->
getMajorVersion()) { if ($existing_project_version->
getMinorVersion() === NULL
) { // If the dev version doesn't specify a minor version, matching on
// the major version alone is considered a match.
return TRUE;
} if ($existing_project_version->
getMinorVersion() ===
$insecure_project_version->
getMinorVersion()) { // If the dev version specifies a minor version, then the insecure
// version must match on the minor version.
return TRUE;
} } } }