From: Sven Schöling Date: Tue, 27 May 2014 15:43:33 +0000 (+0200) Subject: warnings: uninitialized in eq X-Git-Tag: release-3.2.0beta~433 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7c667c9093239a08aec7e9ab0958f6f721a8d6af;p=kivitendo-erp.git warnings: uninitialized in eq --- diff --git a/SL/DB/Customer.pm b/SL/DB/Customer.pm index 36bddc0c7..a19520ed7 100644 --- a/SL/DB/Customer.pm +++ b/SL/DB/Customer.pm @@ -35,7 +35,7 @@ __PACKAGE__->before_save('_before_save_set_customernumber'); sub _before_save_set_customernumber { my ($self) = @_; - $self->create_trans_number if $self->customernumber eq ''; + $self->create_trans_number if !defined $self->customernumber || $self->customernumber eq ''; return 1; } diff --git a/SL/DB/Vendor.pm b/SL/DB/Vendor.pm index 8a1ea464f..9a36afb39 100644 --- a/SL/DB/Vendor.pm +++ b/SL/DB/Vendor.pm @@ -35,7 +35,7 @@ __PACKAGE__->before_save('_before_save_set_vendornumber'); sub _before_save_set_vendornumber { my ($self) = @_; - $self->create_trans_number if $self->vendornumber eq ''; + $self->create_trans_number if !defined $self->vendornumber || $self->vendornumber eq ''; return 1; }