General 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
- 78/100
Línea de trabajo
Lee includes/classes/wp-maintenance-mode-admin.php en torno a WP_Maintenance_Mode_Admin::save_plugin_settings() y el formulario General de views/settings.php. Empieza por comprobar cómo llegan options escalares y options[general] al acceso al estado; después, añade cobertura para envíos malformados junto a las pruebas existentes de configuración. El trabajo estará terminado cuando se rechacen las formas de solicitud no válidas sin que se produzca un TypeError no capturado y sigan funcionando los guardados habituales de la configuración General.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Saving General 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, General 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=general, a valid tab-general nonce, and either string-valued options or string-valued options[general]. The source reaches the reported offset access after its existing guards. The actual captured payload and PHP version are unavailable.
Diagnosis
Conclusion
The captured General 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–422,WP_Maintenance_Mode_Admin::save_plugin_settings(): checks capability, nonce, and tab membership, then directly accesses$_POST['options']['general']['status']without validating the container types. A string-valued container can produce the recorded TypeError at line 422.views/settings.phplines 85–94, General settings form: ordinary markup submits nestedoptions[general][status]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 value comes from POST data, not the persisted settings option. Reaching the access requires passing the existing capability, nonce, and tab checks. Normal form markup supplies an array-shaped payload; how the reported requests acquired a scalar container is unknown. No anonymous exploit or broader frontend failure is established. WordPress core was not runtime-verified.
Test coverage status
No relevant malformed-General-options coverage was found during inspection. tests/page-state-test.php lines 186–214, Test_Page_State::save_design_settings(), exercises a different settings branch with an array-shaped payload. 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 General save with a valid tab nonce and scalar
options, then with scalaroptions[general]. - Compare responses with an ordinary General 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 captured error location matches an unchecked array-offset access in the affected release, with no request-container validation before it.
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
-
Design settings save throws string-offset TypeError for scalar optionsPosiblemente ocupada @girishpanchal30 la tomó hace 2 días. Abiertobug-report bug-report-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Codeinwp/wp-maintenance-mode#596 · 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 68/100
getgrav/grav-plugin-form#664 ·
-
claude
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sprain/sprainocchio#26 ·
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
GSA/digital-gov-drupal#569 ·
Los mantenedores suelen responder en 2 días