Recurring fees with a set number of intervals do not expire; on their last charge remaining_intervals is set to null.

It took me awhile, but I believe this is occurring because of the loose comparison of NULL and 0 in uc_recurring_renew(). The below is never true, because 0 != NULL is never true, based on the tables found here .

if ($fee['remaining_intervals'] != NULL && $fee['remaining_intervals'] == 0) 

I have created a patch to change all of the loose comparisons of NULL and $fee['remaining_intervals'] to use strict comparisons, which has fixed the issue for me.

CommentFileSizeAuthor
#1 uc_recurring-489886.patch2.9 KBadam640kb

Comments

adam640kb’s picture

StatusFileSize
new2.9 KB
univate’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.