From b806163b1e895b1f78206f38cc521d547996786d Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 29 Jan 2007 22:57:55 +0000 Subject: [PATCH] - Fixed a typo in testEnvironment.pl version number for DBD::mysql - Fixed a Recurring Payments processing bug: illegal division by zero --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Workflow/Activity/ProcessRecurringPayments.pm | 7 ++++++- sbin/testEnvironment.pl | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d9654e216..ba22de5f6 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -2,6 +2,8 @@ - fix: Can't add task to project management (perlDreamer Consulting, LLC) - fix: Error in RSS Feed (perlDreamer Consulting, LLC) - rfe: Asset->get should return a copy of the properties hashref + - Fixed a typo in testEnvironment.pl version number for DBD::mysql + - Fixed a Recurring Payments processing bug: illegal division by zero 7.3.8 diff --git a/lib/WebGUI/Workflow/Activity/ProcessRecurringPayments.pm b/lib/WebGUI/Workflow/Activity/ProcessRecurringPayments.pm index a92372a3b..c7cf48e8f 100644 --- a/lib/WebGUI/Workflow/Activity/ProcessRecurringPayments.pm +++ b/lib/WebGUI/Workflow/Activity/ProcessRecurringPayments.pm @@ -94,7 +94,12 @@ sub execute { my $item = WebGUI::Commerce::Item->new($self->session, $itemProperties->{itemId}, $itemProperties->{itemType}); my $time = time; $time -= $transaction->get('initDate'); - my $term = int($time / $self->getDuration($item->duration)) + 1; + my $itemDuration = $self->getDuration($item->duration); + unless ($itemDuration) { + push(@fatal, $itemProperties->{itemId}." has no duration"); + next; + } + my $term = int($time / $itemDuration) + 1; if ($term > $transaction->lastPayedTerm) { my $payment = WebGUI::Commerce::Payment->load($self->session, $transaction->gateway); $transaction->gatewayId; diff --git a/sbin/testEnvironment.pl b/sbin/testEnvironment.pl index 781d27da2..4d01b59db 100644 --- a/sbin/testEnvironment.pl +++ b/sbin/testEnvironment.pl @@ -77,7 +77,7 @@ checkModule("Pod::Coverage",0.17,2); checkModule("Text::Balanced",1.95,1); checkModule("Digest::MD5",2.20); checkModule("DBI",1.40); -checkModule("DBD::mysql",3.002); +checkModule("DBD::mysql",3.0002); checkModule("HTML::Parser",3.36); checkModule("Archive::Tar",1.05); checkModule("Archive::Zip",1.16);