From f5de454caa5b1a9b62b478de01e9e46f6116e7aa Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 5 Jan 2010 18:29:18 +0000 Subject: [PATCH] Bug 3945 NULL is not a valid Supplier id Get SuppliersWithLateIssues should return a list of suppliers If you have subscriptions with no supplier it also returned a invalid supplier with a null id and null name. This patch ignores the non-supplier supplier --- C4/Serials.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Serials.pm b/C4/Serials.pm index 7d45ea7ecb..03d2e5ef29 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -83,6 +83,8 @@ this function get all suppliers with late issues. return : the supplierlist into a hash. this hash containts id & name of the supplier +Only valid suppliers are returned. Late subscriptions lacking a supplier are +ignored. =back @@ -103,6 +105,7 @@ sub GetSuppliersWithLateIssues { $sth->execute; my %supplierlist; while ( my ( $id, $name ) = $sth->fetchrow ) { + next if !defined $id; $supplierlist{$id} = $name; } return %supplierlist; -- 2.39.2