File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -508,7 +508,8 @@ sub computeChecksum {
508508
509509 # Prepare to postpone full inventory when required
510510 my $postpone = 0;
511- $postpone = (($last_state -> get(' _postpone_count' ) // 0) + 1) % ($postpone_config +1)
511+ my $current_count = $last_state -> get(' _postpone_count' ) // ' 0' ;
512+ $postpone = ($current_count =~ / ^\d +$ / ? int ($current_count )+1 : 1) % ($postpone_config +1)
512513 if $postpone_config ;
513514
514515 # Always disable postpone if format is not json
Original file line number Diff line number Diff line change @@ -564,7 +564,7 @@ sub _feedInventory {
564564 if $versionprovider ;
565565
566566 # Don't compute checksum on partial inventory or with glpi-inventory script
567- $self -> {inventory }-> computeChecksum($self -> {config }-> {' full-inventory-postpone' })
567+ $self -> {inventory }-> computeChecksum($self -> {config }-> {' full-inventory-postpone' } =~ / ^ \d + $ / ? int ( $self -> { config } -> { ' full-inventory-postpone ' }) : 0 )
568568 unless $self -> {partial } || $self -> {nochecksum };
569569}
570570
You can’t perform that action at this time.
0 commit comments