Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | undefined_index_plan-2493087-9.patch | 587 bytes | markdorison |
#4 | undefined-index-2493087.patch | 5.88 KB | aburke626 |
Comments
Comment #1
aburke626Comment #2
aburke626I realized that the bigger problem here was this line:
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.
Comment #3
aburke626Comment #4
aburke626Ignore previous patch, we need to check first if #plans even exists within the form.
Comment #5
mmatsoo CreditAttribution: mmatsoo at Chromatic commentedI was able to re-create the
Undefined index: #plans in recurly_subscription_plans_form()
warning and applying the patch got rid of it.Comment #6
mmatsoo CreditAttribution: mmatsoo at Chromatic commentedComment #8
aburke626Comment #9
markdorisonComment #11
markdorison