Skip to content

Compare table PHP Warnings #78

@dwanjuki

Description

@dwanjuki

Describe the bug
PHP warnings (Undefined array key) are triggered when using the Advanced Levels Page compare_table layout if improperly formatted content is provided in the compare attribute.
https://github.com/strangerstudios/pmpro-advanced-levels-shortcode/blob/1.2/templates/levels-compare_table.php#L231-L236

To Reproduce
Steps to reproduce the behavior:

  1. Add the advanced levels shortcode to a page with invalid compare attribute content for the compare_table layout, e.g. [pmpro_advanced_levels levels="1,2" layout="compare_table" compare="hello"]
  2. Visit the advanced levels page
  3. See warnings/Check debug logs

Expected behavior
No PHP warnings.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

Details Advanced Levels Shortcode 1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions