Fix Icinga 2 version detection

With this commit the version prefix character is treated as optional
which always used to be 'r' or 'v'. But this is gone since Icinga 2
version 2.11.0 RC1.

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
Peter Eckel 2019-07-29 13:42:40 +02:00 committed by Johannes Meyer
parent 00e499024f
commit 718ecd05a7
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ class MonitoringBackend implements Selectable, Queryable, ConnectionInterface
$programVersion = $this->select()->from('programstatus', array('program_version'))->fetchOne();
}
return (bool) preg_match(
'/^[vr]2\.\d+\.\d+.*$/',
'/^[vr]?2\.\d+\.\d+.*$/',
$programVersion
);
}