From 1464e864c1823bf48731916e9dc4c481a8d9bdba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 6 Apr 2021 16:43:31 +0200 Subject: [PATCH] CSV-Importe: Warnungen wegen nicht initialisierter Variable vermeiden --- SL/Controller/CsvImport/BankTransaction.pm | 2 +- SL/Controller/CsvImport/CustomerVendor.pm | 2 +- SL/Controller/CsvImport/Inventory.pm | 2 +- SL/Controller/CsvImport/Project.pm | 2 +- SL/Controller/CsvImport/Shipto.pm | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SL/Controller/CsvImport/BankTransaction.pm b/SL/Controller/CsvImport/BankTransaction.pm index 8b5b5e702..77063738c 100644 --- a/SL/Controller/CsvImport/BankTransaction.pm +++ b/SL/Controller/CsvImport/BankTransaction.pm @@ -41,7 +41,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); my $update_policy = $self->controller->profile->get('update_policy') || 'skip'; - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/CustomerVendor.pm b/SL/Controller/CsvImport/CustomerVendor.pm index 8fc893d11..092c6fde5 100644 --- a/SL/Controller/CsvImport/CustomerVendor.pm +++ b/SL/Controller/CsvImport/CustomerVendor.pm @@ -68,7 +68,7 @@ sub check_objects { my %vcs_by_number = map { ( $_->$numbercolumn => $_ ) } @{ $self->existing_objects }; my $methods = $self->controller->headers->{methods}; - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/Inventory.pm b/SL/Controller/CsvImport/Inventory.pm index 238abf33a..c724fb8fc 100644 --- a/SL/Controller/CsvImport/Inventory.pm +++ b/SL/Controller/CsvImport/Inventory.pm @@ -79,7 +79,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/Project.pm b/SL/Controller/CsvImport/Project.pm index 4b846dc27..4fea748c5 100644 --- a/SL/Controller/CsvImport/Project.pm +++ b/SL/Controller/CsvImport/Project.pm @@ -32,7 +32,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; diff --git a/SL/Controller/CsvImport/Shipto.pm b/SL/Controller/CsvImport/Shipto.pm index b4d9e0041..1ca25ad86 100644 --- a/SL/Controller/CsvImport/Shipto.pm +++ b/SL/Controller/CsvImport/Shipto.pm @@ -24,7 +24,7 @@ sub check_objects { $self->controller->track_progress(phase => 'building data', progress => 0); - my $i; + my $i = 0; my $num_data = scalar @{ $self->controller->data }; foreach my $entry (@{ $self->controller->data }) { $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0; -- 2.20.1