Don't throw any exception

refs #9247
This commit is contained in:
Alexander A. Klimov 2015-06-05 10:23:17 +02:00
parent 602f0cf755
commit cbc731034a

View File

@ -3,8 +3,6 @@
namespace Icinga\Application; namespace Icinga\Application;
use Icinga\Exception\IcingaException;
class Version class Version
{ {
/** /**
@ -25,10 +23,7 @@ class Version
'/(?<!.)\s*(?P<gitCommitID>\w+)(?:\s*\(.*?(?:(?<=[\(,])\s*tag\s*:\s*v(?P<appVersion>.+?)\s*(?=[\),]).*?)?\))?\s*(?P<gitCommitDate>\S+)/ms', '/(?<!.)\s*(?P<gitCommitID>\w+)(?:\s*\(.*?(?:(?<=[\(,])\s*tag\s*:\s*v(?P<appVersion>.+?)\s*(?=[\),]).*?)?\))?\s*(?P<gitCommitDate>\S+)/ms',
$appVersion, $appVersion,
$matches $matches
))) { )) || $res === 0) {
throw new IcingaException('Failed at preg_match()');
}
if ($res === 0) {
return false; return false;
} }