getalert - do not generate bad SQL for borrowernumber=0

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2008-02-16 15:01:11 +13:00 committed by Joshua Ferraro
parent 7b2e175f2e
commit 7f654fa140
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}