From 7f654fa140fd59e9cd64db9c3b0ddb7cf48c4ed4 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sat, 16 Feb 2008 15:01:11 +1300 Subject: [PATCH] getalert - do not generate bad SQL for borrowernumber=0 Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Letters.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 07520ed187..857dc5632e 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -175,7 +175,7 @@ sub getalert { my $dbh = C4::Context->dbh; my $query = "select * from alert where"; my @bind; - if ($borrowernumber) { + if ($borrowernumber =~ /^\d+$/) { $query .= " borrowernumber=? and"; push @bind, $borrowernumber; } -- 2.39.5