Project

General

Profile

Actions

Bug #7371

closed

CBSubs Promotions: overriding plan display when applying a promotion to recurring payments only causes fatal errror

Added by krileon over 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
04 December 2018
Due date:
% Done:

100%

Estimated time:

Description

If a always applied promotion that is configured to only apply to recurring payments has "Override plans display" set to "Yes" it will throw the following error anywhere a qualifying plan is loaded (e.g. on profile).

Call to a member function isAnyAutoRecurringPossibleWithThisBasket() on null
\plug_cbpaidsubscriptions\plugin\cbsubspromotion\cbsubs.promotion.php:445

https://www.joomlapolis.com/forum/153-professional-member-support/240175-question-about-promotion-that-affects-only-auto-recurring-payments?start=6#309030

Actions #1

Updated by krileon over 5 years ago

Appears to be due to checkPromotionApplicable usage in getPromotionsApplicableForPlan of /components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubspromotion/cbsubs.promotion.php as $paymentBasket is being set to null (since one doesn't exist here). Quick fix is probably to not use null but just set an empty basket as all the function calls are expecting a basket object.

Actions #2

Updated by beat almost 4 years ago

  • Project changed from 2 to CB Paid Subscriptions
  • Status changed from Assigned to Resolved
  • Priority changed from Urgent to Normal
  • % Done changed from 0 to 100

Fixed in MR !195 with commit 5c7e7e310ce27d6fc02f6737496972edccc94874

Actions #3

Updated by beat almost 4 years ago

  • Target version changed from CbSubs 4.4.1 to 4.4.0
Actions #4

Updated by beat almost 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF