mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-05-28 04:34:08 -04:00
Fix 'vsprintf(): Too few arguments' unexisting imported node exception
If the imported node does not exist, no arguments is passed to BpConfig::addError() by ImportedNode::createFailedNode(). Added 'if' condition in BpConfig::addError() in case no arguments are passed to vsprintf. refs #234
This commit is contained in:
parent
1278480b6e
commit
f5166f4348
1 changed files with 3 additions and 1 deletions
|
|
@ -915,7 +915,9 @@ class BpConfig
|
|||
{
|
||||
$args = func_get_args();
|
||||
array_shift($args);
|
||||
$msg = vsprintf($msg, $args);
|
||||
if (! empty($args)) {
|
||||
$msg = vsprintf($msg, $args);
|
||||
}
|
||||
if ($this->throwErrors) {
|
||||
throw new IcingaException($msg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue