Repository navigation
Description
Summary
Saving Design settings can terminate with TypeError: Cannot access offset of type string on string when the submitted options structure contains a string where an array is expected. Invalid settings submissions are expected to be rejected without an uncaught exception. The captured failure aborts the settings-save request.
Customer context
- Product / area: LightStart, Design settings save
- Version: 2.6.25
- Environment: PHP and WordPress versions not provided
- Reported error:
TypeError: Cannot access offset of type string on string - Impact: Settings-save request terminates
- Evidence: Error captured in two November 4 uninstall submissions; exact request bodies unavailable
Reproduction notes
Repository-derived reproduction, not executed: submit the authenticated settings-save action with tab=design, a valid tab-design nonce, and either string-valued options or string-valued options[design]. The source reaches the reported offset access after its existing guards. The actual captured payload and PHP version are unavailable.
Diagnosis
Conclusion
The captured Design settings error matches a definite unchecked request-shape access in v2.6.25. This is source-backed confirmation, not an inference from the number of uninstall comments. The request body that produced the recorded error remains unknown.
Where this likely occurs
includes/classes/wp-maintenance-mode-admin.phplines 72–73,WP_Maintenance_Mode_Admin::__construct(): registerssave_plugin_settings()on the authenticated settings-save action.includes/classes/wp-maintenance-mode-admin.phplines 392–417 and 468–472,WP_Maintenance_Mode_Admin::save_plugin_settings(): capability, nonce, and tab checks precede the Design branch, but neither options container is type-validated before accessing$_POST['options']['design']['title']. A string-valued container can produce the recorded TypeError at line 470 before field sanitization completes.views/settings.phplines 203 and 337–346, Design settings form: ordinary markup submits nested Design option fields.- Tagged v2.6.25 source matches the recorded line. Blame attributes the access to commit
72a22e07; the v2.6.24..v2.6.25 comparison leaves this handler unchanged, so no new regression is established.
Engineering notes
The failing structure is submitted POST data rather than the saved settings option. The path requires passing capability, nonce, and tab checks. Ordinary form markup is array-shaped; the origin of scalar data in the captured requests is unknown. The failure occurs while evaluating the field access, independently of the field sanitizer's behavior. No anonymous exploit or broader frontend failure is established.
Test coverage status
tests/page-state-test.php lines 186–214, Test_Page_State::save_design_settings(), constructs an array-shaped Design submission; test_design_form_save_switches_selection_through_the_same_lifecycle() begins at line 217. No relevant scalar-container coverage was found during inspection. PHP and Docker are unavailable in this environment, so tests and a local PHP reproduction were not run.
What to verify or explore next
- Reproduce an authenticated Design save with a valid tab nonce and scalar
options, then with scalaroptions[design]. - Compare responses with an ordinary Design form submission.
- Obtain the originating request shape and PHP version if available.
Unknowns / follow-up
The telemetry includes no request body or stack trace. The reason the malformed payload was submitted is not established.
Confidence
Confidence: 93/100
The affected tag contains an unguarded Design field access at the exact captured error line, consistent with a scalar options container.
Source: automated uninstall feedback — wp-maintenance-mode, 2026-11-04
Generated by bug-report-triage (ID: bug-report-triage_6aec0d90cde642.94809936)
Activity
pirate-bot commentedon Nov 5, 2026
Another customer reported this via support.
Saving Design settings can terminate with a
TypeError: Cannot access offset of type string on stringwhen the submitted options structure contains a string instead of an array. The investigation traced this toWP_Maintenance_Mode_Admin::save_plugin_settings()inincludes/classes/wp-maintenance-mode-admin.php, where$_POST['options']['design']is accessed directly without validating that the containers are arrays. The issue can be reproduced by submitting the authenticated save action with string-valued options data, though the origin of the malformed payload in the wild remains unknown.Source: automated uninstall feedback — wp-maintenance-mode, 2026-11-04
Generated by bug-report-triage (ID: bug-report-triage_6aec0d90d68029.28608886)
girishpanchal30 commentedon Nov 5, 2026
I have fixed it with PR #600
rodica-andronache commentedon Nov 5, 2026
🧪 QA steps and test links
When a LightStart settings save arrives with a malformed form (the Design options sent as plain text instead of a set of fields), the save crashes with a white "critical error" page instead of being rejected. Normal use of the form doesn't send this, so the steps below send the malformed save from the browser console.
Requires: PHP 8.0 or newer (the links use 8.3). A browser with DevTools.
0b5ac3dIn the links:
wpsandbox.wordpress.netframe in the context dropdown (top left, says "top") before pasting.-devsuffix.debug.log.Reproduce on LightStart 2.6.25:
var f=document.querySelector('#tab-design form'),i=document.createElement('input');i.type='hidden';i.name='options[design]';i.value='x';f.append(i);HTMLFormElement.prototype.submit.call(f);PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string.Edge cases
#tab-general formandoptions[general](issue General settings save throws string-offset TypeError for scalar options #595): "The submitted settings are invalid.", no crash.Fix: #600 (open, also closes #595)
pirate-bot commentedon Nov 5, 2026
QA agent — 🟢 Passing checks · Malformed Design saves are rejected without a crash.
The two simulated malformed Design requests produced a critical error on the base build but were rejected without changing settings on the candidate. Ordinary settings saves persisted, and the selected maintenance page appeared to a logged-out visitor. The new settings-save tests passed on both PHP versions tested.
Worth a human look
Checks (10 passed)
Full report, evidence and session trail
pirate-bot commentedon Nov 13, 2026
🎉 This issue has been resolved in version 2.6.26 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀