Issue:
php.NOTICE: Notice: Undefined index: #plans in recurly_subscription_plans_form() (line 407 of docroot/sites/all/modules/contrib/recurly/includes/recurly.admin.inc).

Solution:
Set a default value for #plans in the event that no plans have yet been defined in Recurly, and let the user know that in order to use built-in pages, plans must be created.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aburke626’s picture

Version: 7.x-1.2 » 7.x-1.3
aburke626’s picture

FileSize
541 bytes

I realized that the bigger problem here was this line:

  $plan_list += is_array($form['#plans']) ? $form['#plans'] : array();

because that `is_array()` call will always be true, because it's evaluating an array. We want to know if the array is set, so I think changing it to `isset()` will do it.

aburke626’s picture

Status: Active » Needs review
aburke626’s picture

FileSize
5.88 KB

Ignore previous patch, we need to check first if #plans even exists within the form.

mmatsoo’s picture

I was able to re-create the Undefined index: #plans in recurly_subscription_plans_form() warning and applying the patch got rid of it.

mmatsoo’s picture

Status: Needs review » Reviewed & tested by the community

  • aburke626 committed f752629 on 7.x-1.x
    Issue #2493087 by aburke626: Undefined index #plan on subscription plan...
aburke626’s picture

Version: 7.x-1.3 » 8.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)
markdorison’s picture

Priority: Normal » Minor
Status: Patch (to be ported) » Needs review
FileSize
587 bytes

markdorison’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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