Skip to content

Handled non-array option values - #1103

Open
girishpanchal30 wants to merge 1 commit into
developmentfrom
bugfix/1099
Open

Handled non-array option values#1103
girishpanchal30 wants to merge 1 commit into
developmentfrom
bugfix/1099

Conversation

@girishpanchal30

Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

Return the Optimole settings as an array instead of false when the settings are not set. This is to avoid errors when merging the settings with other arrays.

Closes #1099

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@pirate-bot

Copy link
Copy Markdown
Collaborator

Plugin build for 0165f5e is ready 🛎️!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents logger cron failures when Optimole settings are absent or malformed.

Changes:

  • Guarantees raw settings are returned as an array.
  • Normalizes logger input before merging.
  • Adds regression tests for missing, malformed, and sensitive settings.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
inc/settings.php Normalizes raw option values to arrays.
inc/main.php Safely normalizes logger data.
tests/test-logger-data.php Adds logger settings regression coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants