diff --git a/elevate-cpanel b/elevate-cpanel index 7f2d297b..f85a91a0 100755 --- a/elevate-cpanel +++ b/elevate-cpanel @@ -5588,7 +5588,7 @@ EOS $self->{_yum_repos_path_using_invalid_syntax} = []; $self->{_yum_repos_to_disable} = []; $self->{_yum_repos_unsupported_with_packages} = []; - $self->{_duplicate_repoids} = []; + $self->{_duplicate_repoids} = {}; my @vetted_repos = Elevate::OS::vetted_yum_repo(); @@ -5716,6 +5716,7 @@ EOS } sub _autofix_duplicate_repoids ($self) { + return unless ref $self->{_duplicate_repoids} && ref $self->{_duplicate_repoids} eq 'HASH'; my %duplicate_ids = $self->{_duplicate_repoids}->%*; foreach my $id ( keys %duplicate_ids ) { if ( $id =~ m/^MariaDB[0-9]+/ ) { diff --git a/lib/Elevate/Components/Repositories.pm b/lib/Elevate/Components/Repositories.pm index 71d856bd..7ec73275 100644 --- a/lib/Elevate/Components/Repositories.pm +++ b/lib/Elevate/Components/Repositories.pm @@ -326,7 +326,7 @@ sub _check_yum_repos ($self) { $self->{_yum_repos_path_using_invalid_syntax} = []; $self->{_yum_repos_to_disable} = []; $self->{_yum_repos_unsupported_with_packages} = []; - $self->{_duplicate_repoids} = []; + $self->{_duplicate_repoids} = {}; my @vetted_repos = Elevate::OS::vetted_yum_repo(); @@ -458,6 +458,7 @@ sub _check_yum_repos ($self) { } sub _autofix_duplicate_repoids ($self) { + return unless ref $self->{_duplicate_repoids} && ref $self->{_duplicate_repoids} eq 'HASH'; my %duplicate_ids = $self->{_duplicate_repoids}->%*; foreach my $id ( keys %duplicate_ids ) { if ( $id =~ m/^MariaDB[0-9]+/ ) {