Skip to content

fix: guard against undefined properties on license object in Library#1269

Open
HardeepAsrani wants to merge 2 commits intodevelopmentfrom
fix/issue-559
Open

fix: guard against undefined properties on license object in Library#1269
HardeepAsrani wants to merge 2 commits intodevelopmentfrom
fix/issue-559

Conversation

@HardeepAsrani
Copy link
Member

Summary

When the license option is stored as a stdClass without key or download_id properties (e.g. on a free/unlicensed install), PHP 8 throws an undefined-property notice. Add isset() guards so both properties fall back to an empty string.

Will affect visual aspect of the product

YES/NO

Screenshots

Test instructions

  • Make sure the error doesn't appear anymore.
  • The error only appears when you're using free version without Pro and no license being there, if the Pro was used in past.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/visualizer-pro/issues/559.

When the license option is stored as a stdClass without `key` or
`download_id` properties (e.g. on a free/unlicensed install), PHP 8
throws an undefined-property notice.  Add isset() guards so both
properties fall back to an empty string.
@HardeepAsrani HardeepAsrani added the pr-checklist-skip Allow this Pull Request to skip checklist. label Mar 10, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Mar 10, 2026
@pirate-bot
Copy link
Contributor

pirate-bot commented Mar 10, 2026

Plugin build for b3fe322 is ready 🛎️!

@HardeepAsrani HardeepAsrani requested a review from abaicus March 10, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants