mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
IcingaException: Only use vsprintf()
if $args
given
If the passed message contains a `%`, but no `$args`, `vsprintf()` throws an error.
This commit is contained in:
parent
10d3fb64f9
commit
5000d3117b
@ -25,7 +25,12 @@ class IcingaException extends Exception
|
||||
$exc = $arg;
|
||||
}
|
||||
}
|
||||
parent::__construct(vsprintf($message, $args), 0, $exc);
|
||||
|
||||
if (! empty($args)) {
|
||||
$message = vsprintf($message, $args);
|
||||
}
|
||||
|
||||
parent::__construct($message, 0, $exc);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user