From 7c667c9093239a08aec7e9ab0958f6f721a8d6af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 27 May 2014 17:43:33 +0200 Subject: [PATCH] warnings: uninitialized in eq --- SL/DB/Customer.pm | 2 +- SL/DB/Vendor.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1