From d66a69d80eba396dc773f31160d754d47db5c110 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 9 Sep 2016 15:28:02 +0200 Subject: [PATCH] + Fix #490 --- .../hardware/printers/standard/rfc3805/mode/markersupply.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/hardware/printers/standard/rfc3805/mode/markersupply.pm b/centreon-plugins/hardware/printers/standard/rfc3805/mode/markersupply.pm index 94662b888..a8ce3512b 100644 --- a/centreon-plugins/hardware/printers/standard/rfc3805/mode/markersupply.pm +++ b/centreon-plugins/hardware/printers/standard/rfc3805/mode/markersupply.pm @@ -103,8 +103,8 @@ sub run { my $current_value = $result2->{$oid_prtMarkerSuppliesLevel . '.' . $instance}; my $max_value = $result2->{$oid_prtMarkerSuppliesMaxCapacity . '.' . $instance}; - if (!defined($unit_managed{$unit})) { - $self->{output}->output_add(long_msg => "Skipping marker supply '$descr': unit not managed."); + if (!defined($unit) || !defined($unit_managed{$unit})) { + $self->{output}->output_add(long_msg => "Skipping marker supply '$descr': no unit or not managed."); next; } if ($current_value == -1) {