Skip to content

fix: guard the promo bar against empty and damaged banner data - #641

Merged
imantsk merged 2 commits into
release/v4.1.2/corefrom
fix/promo-banner-guards/core
Nov 27, 2026
Merged

imantsk merged 2 commits into
release/v4.1.2/corefrom
fix/promo-banner-guards/core

Conversation

@imantsk

@imantsk imantsk commented Nov 27, 2026

Copy link
Copy Markdown
Member

Changes

  • Welcome_Client::get_banner() returns an empty banner when the stored welcome data holds a banner that is not an array, instead of a TypeError on the Snippets screen.
  • Bootstrap_Admin::get_active_notice() skips a feed banner whose text is empty after stripping tags, so no empty promo bar is shown.

Verification

  • New unit tests for both cases; each fails without its change and passes with it.
  • PHPUnit (single site) and phpcs.

@imantsk imantsk added the run-tests Trigger automated tests label Nov 27, 2026
@imantsk
imantsk merged commit 3c93ab6 into release/v4.1.2/core Nov 27, 2026
41 of 47 checks passed
@imantsk
imantsk deleted the fix/promo-banner-guards/core branch November 27, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger automated tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant