mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-27 10:01:38 +00:00
SectionConfig: disable duplicate plugin registration
This commit is contained in:
parent
891b224a8f
commit
ebd2b0aca5
@ -26,6 +26,9 @@ sub register {
|
|||||||
my $type = $class->type();
|
my $type = $class->type();
|
||||||
my $pdata = $class->private();
|
my $pdata = $class->private();
|
||||||
|
|
||||||
|
die "duplicate plugin registration (type = $type)"
|
||||||
|
if defined($pdata->{plugins}->{$type});
|
||||||
|
|
||||||
my $plugindata = $class->plugindata();
|
my $plugindata = $class->plugindata();
|
||||||
$pdata->{plugindata}->{$type} = $plugindata;
|
$pdata->{plugindata}->{$type} = $plugindata;
|
||||||
$pdata->{plugins}->{$type} = $class;
|
$pdata->{plugins}->{$type} = $class;
|
||||||
|
Loading…
Reference in New Issue
Block a user