IcingaCommand: allow underscore in constant names

This commit is contained in:
Thomas Gelf 2016-04-01 14:08:27 +02:00
parent 03d739170c
commit 65b048d78b
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ class IcingaCommand extends IcingaObject
{
$command = $this->command;
$prefix = '';
if (preg_match('~^([A-Z][A-Za-z0-9]+\s\+\s)(.+?)$~', $command, $m)) {
if (preg_match('~^([A-Z][A-Za-z0-9_]+\s\+\s)(.+?)$~', $command, $m)) {
$prefix = $m[1];
$command = $m[2];
} elseif ($command[0] !== '/') {