From f5166f434868957863bf199fccce26b022f718e7 Mon Sep 17 00:00:00 2001 From: Ravi Kumar Kempapura Srinivasa Date: Wed, 26 Feb 2020 10:33:50 +0100 Subject: [PATCH] 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 --- library/Businessprocess/BpConfig.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Businessprocess/BpConfig.php b/library/Businessprocess/BpConfig.php index 2121b40..c49d262 100644 --- a/library/Businessprocess/BpConfig.php +++ b/library/Businessprocess/BpConfig.php @@ -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); }