Skip to content

fix: allow null $context in dashboardOptions capability filter#76

Merged
YvetteNikolov merged 1 commit into
mainfrom
fix/seopress
Jun 22, 2026
Merged

fix: allow null $context in dashboardOptions capability filter#76
YvetteNikolov merged 1 commit into
mainfrom
fix/seopress

Conversation

@YvetteNikolov

@YvetteNikolov YvetteNikolov commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

$context kan opeens null zijn? Na een update van SEOPress. Kan verder geen referentie vinden van deze hook in een changelog.

Fix deze error als je in het menu komt

Screenshot 2026-06-22 at 14 26 08

Copilot AI review requested due to automatic review settings June 22, 2026 12:29
@YvetteNikolov YvetteNikolov requested a review from a team as a code owner June 22, 2026 12:29

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

This PR fixes a runtime type error in the SEOPress capability filter callback by allowing the $context argument to be null, which can occur when SEOPress invokes the seopress_capability filter without (or with a null) context.

Changes:

  • Update dashboardOptions() signature to accept an optional nullable $context (?string $context = null).
  • Switch capability-context comparisons to strict equality (===) to align with strict typing.

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

@YvetteNikolov YvetteNikolov merged commit 3b2fa66 into main Jun 22, 2026
3 checks passed
@YvetteNikolov YvetteNikolov deleted the fix/seopress branch June 22, 2026 13:38
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.

4 participants