From 2470aeb75054f2874d52dd421d58b78d4eb4eb1b Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 26 Apr 2009 23:14:22 +0000 Subject: [PATCH] Forward porting SQL Report/Paginator errorNum fix. errorNum is undefined for no errors. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Paginator.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index b70a5286a..1e9209acb 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,6 +4,7 @@ - fixed #10226: html2text dropping text - fixed #10210: Generated Message-Id invalid (patch basis from tektek) - fixed #10209: Changing existing user profile field type doesn't change underlying database column type + - fixed #10047: SQLReport Debug doesn't catch when bind variables are incorrect 7.7.4 - rfe: Extend DateTime for Week-Nrs (#9151) diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index 8305552e2..4cbf6fab9 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -713,7 +713,7 @@ sub setDataByQuery { my $sth; if ($unconditional) { $sth = $dbh->unconditionalRead($sql,$placeholders); - return $sth->errorMessage if ($sth->errorCode > 0); + return $sth->errorMessage if (defined $sth->errorCode); } else { $sth = $dbh->read($sql,$placeholders); }