mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-06 05:31:24 +00:00
allow to pass undefined value to template_replace
This commit is contained in:
parent
7f0f0610ab
commit
3250f5c799
@ -454,6 +454,8 @@ sub trim {
|
||||
sub template_replace {
|
||||
my ($tmpl, $data) = @_;
|
||||
|
||||
return $tmpl if !$tmpl;
|
||||
|
||||
my $res = '';
|
||||
while ($tmpl =~ m/([^{]+)?({([^}]+)})?/g) {
|
||||
$res .= $1 if $1;
|
||||
|
Loading…
Reference in New Issue
Block a user