You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code simply doesn't work and is functionally broken. It will compare 8.0.0 to 7.4.0 and return FALSE when it should return TRUE.
I will work on a PR, but in the meantime as a workaround it is easier to just remove the use of this function from the code if you know you are running a PHP version >8.0.0
edit: looks like a PR has already been created with the fix. Needs to be merged.
/**
* A private methode to save the company details in the DB.
*
* @param mixed $version
*
* @return bool
*/
private function isPHPVersionMoreRecentThan($version)
{
$phpVersion = PHP_VERSION;
$phpVersionParts = explode('.', $phpVersion);
$phpMinVersionParts = explode('.', $version);
if ((int) $phpVersionParts[0] < (int) $phpMinVersionParts[0]) {
return false;
} elseif ((int) $phpVersionParts[1] < (int) $phpMinVersionParts[1]) {
return false;
} elseif ((int) $phpVersionParts[2] < (int) $phpMinVersionParts[2]) {
return false;
}
return true;
}
The text was updated successfully, but these errors were encountered:
This code simply doesn't work and is functionally broken. It will compare 8.0.0 to 7.4.0 and return FALSE when it should return TRUE.
I will work on a PR, but in the meantime as a workaround it is easier to just remove the use of this function from the code if you know you are running a PHP version >8.0.0
edit: looks like a PR has already been created with the fix. Needs to be merged.
The text was updated successfully, but these errors were encountered: