From dbf463a08031810f39bc0f138da3aa959aba5ebd Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Tue, 8 Oct 2024 12:11:49 +0200 Subject: [PATCH] fix: Rework previous fix on windows videos inventory to also work when satisfying unittests --- lib/GLPI/Agent/Task/Inventory/Win32/Videos.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GLPI/Agent/Task/Inventory/Win32/Videos.pm b/lib/GLPI/Agent/Task/Inventory/Win32/Videos.pm index acfa5cc6a..491e1ef39 100644 --- a/lib/GLPI/Agent/Task/Inventory/Win32/Videos.pm +++ b/lib/GLPI/Agent/Task/Inventory/Win32/Videos.pm @@ -72,7 +72,7 @@ sub _getVideos { ); if ($videokey) { foreach my $subkey (keys(%{$videokey})) { - next unless $subkey =~ m{/$} && defined($videokey->{$subkey}) && ref($videokey->{$subkey}) eq "HASH"; + next unless $subkey =~ m{/$} && defined($videokey->{$subkey}) && ref($videokey->{$subkey}); my $thispnpdeviceid = _pnpdeviceid($videokey->{$subkey}->{"/MatchingDeviceId"}) or next; next unless $thispnpdeviceid eq $pnpdeviceid;