Repository navigation
Description
Summary
Otter Blocks 3.2.11 can emit Warning: Undefined array key "default" while processing Black Friday promotional configuration when an earlier filter has removed the default configuration.
Expected behavior: processing an empty or default-free promotional configuration completes without PHP warnings.
Actual behavior: Otter emits the reported warning. The affected user deactivated the plugin because of it; no fatal error or data loss was reported.
Customer context
- Product / area: Otter Blocks free, Black Friday promotions.
- Version: 3.2.11.
- Environment: WordPress and PHP versions not provided. The deactivation metadata reports SDK version 2.0.0; the installed SDK source was not available for verification.
- Integration / third party: Active plugins and custom filters unknown.
- Reported error / symptom:
Warning: Undefined array key "default"in Otter's main PHP file, line 639. - Impact: User deactivated the plugin.
Reproduction notes
Reported: Otter Blocks free 3.2.11 emitted the undefined default key warning, prompting deactivation. No exact triggering screen was supplied.
Source-derived verification scenario, not runtime-reproduced:
- Activate Otter Blocks 3.2.11 in a disposable WordPress installation.
- Register a callback before Otter's
themeisle_sdk_blackfriday_datacallback that returns an empty array. - During an active or simulated Black Friday sale, open the Plugins screen to exercise promotional metadata processing with PHP warnings recorded.
- Check for
Undefined array key "default"atinc/class-main.php:639.
Easy MCP AI contains a real empty-array policy on this hook, but its presence on the customer's site was not reported. Local runtime execution was unavailable because PHP is not installed.
Diagnosis
Conclusion
The affected release directly reads a configuration key that can be absent after earlier filters. This matches the reported warning exactly. Source inspection confirms a concrete producer of empty configurations in a companion product, but does not establish which filter removed the key on the reporting site. The defect remains in current Otter source.
Where this likely occurs
- Otter:
inc/class-main.php, line 52 —Main::init()registersadd_black_friday_data()on the sharedthemeisle_sdk_blackfriday_datafilter. - Otter:
inc/class-main.php, lines 631–639 —Main::add_black_friday_data()documents an array of product configurations and immediately reads$configs['default']without checking its presence. - SDK sibling reference:
src/Modules/Announcements.php, lines 447–459 —Announcements::add_plugin_meta_links()applies the shared filter and explicitly accepts an empty resulting configuration.Announcements::black_friday_notice_render(), lines 225–245, also accepts empty results and accommodates an absent default. - Easy MCP AI sibling:
includes/class-themeisle-sdk.php, lines 81–94 and 396–413 —Themeisle_SDK::register()registers the policy filters;Themeisle_SDK::policy()maps the shared Black Friday filter to__return_empty_array. When registered before Otter's callback, this supplies the failing input. - Git evidence: commit
f218caad9e92c3b698f4b95f9f994707fe02274aintroduced the callback and unguarded access. The callback is absent inv3.0.11and present inv3.0.12. It remains unchanged at the failing access inv3.2.10,v3.2.11, and current source. This is not a newly introduced 3.2.11 regression.
Engineering notes
The SDK initially supplies a default entry, but the shared filter chain can replace that array before Otter receives it. Empty configuration is an intentionally supported suppression state in the inspected SDK and Easy MCP AI paths. The failure is in Otter's configuration consumer, not evidence of a partial deployment or missing runtime symbol. The free plugin owns this callback; Pro is not required to reach the read. Registration order determines whether the inspected companion policy precedes Otter.
Test coverage status
No relevant Otter callback coverage was found during inspection of tracked tests. The SDK sibling's tests/announcement-test.php, lines 262–272 — Test_Announcements::test_add_plugin_meta_links_returns_unchanged_when_configs_empty() — covers the SDK's empty-result behavior, not its interaction with Otter's callback. Runtime tests were not run because PHP is unavailable in this environment.
What to verify or explore next
- On a disposable WordPress installation with Otter 3.2.11, verify the warning when an earlier shared-filter callback returns an empty array during the sale window.
- Compare the same scenario with Otter v3.0.11 and v3.0.12 to validate the source-identified introduction boundary at runtime.
- Verify registration order and warning behavior with Easy MCP AI active alongside Otter.
- Check normal configurations containing
defaultas a control.
Unknowns / follow-up
The customer's triggering screen, actual configuration payload, active-plugin list, PHP version, and filter registration order are unknown. The SDK sibling is reference source, not a verified copy of the customer's installed dependency. WordPress core filter internals were not inspected locally, and no live-site investigation was performed.
Confidence
Confidence: 97/100
The reported file and line match the tagged source exactly, and inspected companion code supplies the missing-key state through the same shared filter. The site's specific configuration producer remains unknown.
Source: HelpScout #3522669360
Generated by bug-report-triage (ID: bug-report-triage_6b03d680a596e6.66479444)
Activity
girishpanchal30 commentedon Nov 23, 2026
I have fixed it with PR #3198
milicavs commentedon Nov 23, 2026
🧪 QA steps and test links
During the Black Friday sale week, when another plugin opts the site out of the Themeisle Black Friday promotion, Otter still processes the promotion and logs
Warning: Undefined array key "default"on every admin page that loads it, such as Plugins. It also still shows the "Otter Pro: 60% off this week" banner that was meant to be switched off.Requires: the Black Friday sale window (it started Monday, Nov 23), and Otter active for more than 3 days, or the snippet below.
3c5509bIn the links:
debug.log.Reproduce on Otter Blocks 3.2.11:
WP_DEBUG_LOGon, add a Code Snippet titled "QA BF opt-out", set to run everywhere:add_filter( 'themeisle_sdk_blackfriday_data', '__return_empty_array', 5 ); update_option( 'otter_blocks_install', time() - 10 * DAY_IN_SECONDS );Undefined array key "default"from Otter'sinc/class-main.php, and the "Otter Pro: 60% off this week" banner above the plugin list.Edge cases
Fix: #3198 (open)
pirate-bot commentedon Nov 23, 2026
🎉 This issue has been resolved in version 3.2.12 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
pirate-bot commentedon Nov 23, 2026
QA agent — 🟢 Passing checks · The "Undefined array key default" Black Friday warning is gone, and opting out of the sale now hides Otter's banner cleanly.
We set up Otter during Black Friday week, with Otter installed 10 days ago. A small test plugin empties the shared Black Friday settings before Otter reads them, as other plugins do. On the old build, opening Plugins logged the reported warning at class-main.php line 639 and still showed Otter's sale banner. On the new build, the log stayed empty and no banner or sale link appeared. Without the opt-out, the normal sale banner and row link still show. Standalone Blocks Animation and Blocks CSS behave the same way, and the new unit tests pass.
Worth a human look
Checks (6 passed)
Undefined array key "default"warning (or any other PHP warning/notice from otter-blocks) in debug.log; the same journey on the qa-base build does log the warning.Undefined array key "default"warning or other PHP warning from those plugins, and no Black Friday banner/row link from them.Full report, evidence and session trail