Design settings save throws string-offset TypeError for scalar options
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 69/100
Línea de trabajo
Lee includes/classes/wp-maintenance-mode-admin.php, especialmente save_plugin_settings() en la rama Design; después, inspecciona tests/page-state-test.php y su helper save_design_settings(). Reproduce un guardado autenticado de Design con options escalar y options[design] escalar, y luego compáralo con el envío habitual del formulario. El objetivo se cumple cuando se rechazan las formas malformadas de las opciones sin que se produzca un TypeError no capturado y el guardado válido de Design sigue pasando su prueba existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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)
- Lenguaje dominante
- PHP
- Estrellas
- 163
- Forks
- 82
- Merge medio
- 4 h 2 min
- PR fusionados (30 d)
- 7
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Codeinwp/wp-maintenance-mode
-
General settings save throws string-offset TypeError for scalar optionsPosiblemente ocupada @girishpanchal30 la tomó hace 1 día. Abiertobug-report bug-report-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Codeinwp/wp-maintenance-mode#595 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
customer report feature-request-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
Codeinwp/wp-maintenance-mode#587 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
feature-request-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
Codeinwp/wp-maintenance-mode#586 ·
Los mantenedores suelen responder en 1 día
-
feature-request-triage
Dificultad 4/5 3-5 días Aptitud para principiantes 50/100
Codeinwp/wp-maintenance-mode#550 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
feature-request-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Codeinwp/wp-maintenance-mode#549 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Codeinwp/wp-maintenance-mode
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Automattic/blocks-engine#4874 ·
Los mantenedores suelen responder en 1 día
-
Visual COBOL: missing 11.0 and 12.0, and 9.0 date differs from Rocket Software's lifecycle pageAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
endoflife-date/endoflife.date#11561 ·
Los mantenedores suelen responder en 1 día
-
good first issue priority:low type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
crazy-goat/fdb-php#184 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
nextcloud/groupfolders#5218 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
nextcloud/fulltextsearch_elasticsearch#621 ·
Los mantenedores suelen responder en 1 día