mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Don't include self-referential structures in list of interfaces, as they can't be serialized
This commit is contained in:
@@ -627,9 +627,23 @@ foreach my $origl (@$lref) {
|
||||
}
|
||||
$lnum++;
|
||||
}
|
||||
&cleanup_yaml_parents($rv);
|
||||
return $rv;
|
||||
}
|
||||
|
||||
# cleanup_yaml_parents(&config)
|
||||
# Remove all 'parent' fields once parsing is done, as they can't be serialized
|
||||
sub cleanup_yaml_parents
|
||||
{
|
||||
my ($conf) = @_;
|
||||
foreach my $c (@$conf) {
|
||||
delete($c->{'parent'});
|
||||
if ($c->{'members'}) {
|
||||
&cleanup_yaml_parents($c->{'members'});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# yaml_lines(&directive, indent-string)
|
||||
sub yaml_lines
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user