mirror of
https://github.com/Combodo/iTop.git
synced 2026-07-02 21:06:41 +02:00
N°9675 - geptile PR fixes + enhance regexp for cli php version
This commit is contained in:
@@ -93,7 +93,7 @@ class ModelReflectionSerializer
|
||||
public function CheckCliPhpVersionFromOutput(string $sUIPhpVersion, string $sPHPExec, $aOutput): void
|
||||
{
|
||||
$sFoundVersion = trim($aOutput[0] ?? "");
|
||||
if (preg_match('/^.* (\d\.\d)\.\d/', $sFoundVersion, $aMatches)) {
|
||||
if (preg_match('/(\d+\.\d+)(?:\.\d+)?/', $sFoundVersion, $aMatches)) {
|
||||
$sFoundVersion = $aMatches[1];
|
||||
}
|
||||
if ($sFoundVersion != $sUIPhpVersion) {
|
||||
|
||||
Reference in New Issue
Block a user