add defined check for $conf->{'_inventory_purge'}

This commit is contained in:
Shigekazu Aoyagi 2017-04-11 03:37:23 +00:00
parent 311ac744c6
commit 200b821a20

View File

@ -93,7 +93,7 @@ sub pandora_purgedb ($$) {
}
# Delete old inventory data
if ($conf->{'_inventory_purge'} > 0) {
if (defined ($conf->{'_inventory_purge'}) && $conf->{'_inventory_purge'} > 0) {
if (enterprise_load (\%conf) != 0) {
my $ulimit_timestamp_inventory = time() - (86400 * $conf->{'_inventory_purge'});