Cron logger crashes when Optimole settings option is a string
Los mantenedores suelen responder en 1 día
@girishpanchal30 ya está trabajando en esto.
Desde el 6/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
Optimole can terminate a cron request while collecting logger data if its stored settings value is not an array.
Expected behavior: Logger data collection handles an invalid or legacy settings value without terminating the cron request.
Actual behavior: The request throws Error: Cannot unset string offsets.
Impact: Affected sites can have scheduled WordPress work interrupted when the Optimole logger runs.
Customer context
- Product / area: Optimole WordPress plugin, cron logger data collection
- Version: 4.2.10
- Environment: WordPress 7.0.2; PHP 8.2.33
- Integration / third party: Themeisle SDK 3.3.58 is present in the logged call chain, but the fatal frame is in Optimole product code.
- Reported error / symptom:
Error: Cannot unset string offsets - Impact: 2 telemetry occurrences across 1 site between 2026-08-05 and 2026-08-06.
Reproduction notes
- On Optimole
v4.2.10, persist a non-array value such as a string for theoptml_settingsoption. - Trigger the cron workflow that sends Themeisle SDK logger data.
- The product filter reaches
Optml_Main::add_settings()and telemetry indicates the request throwsError: Cannot unset string offsets.
The production crash was observed twice on one site. The malformed option value and its originating workflow are not available from telemetry.
Diagnosis
Conclusion
Production telemetry identifies Optml_Main::add_settings() as the fatal frame during a cron-triggered logger action. In release v4.2.10, the method obtains the raw optml_settings option without validating its type, then uses array-offset unset() operations. A string stored in that option therefore matches the recorded Cannot unset string offsets error. This is confirmed by the post-release commit 0165f5e7, titled fix: handle non-array option values, which changes the raw-settings method to return an empty array for non-array values.
Where this likely occurs
inc/main.php—Optml_Main::add_settings()lines 159-164 registers the logger-data callback and unsetsservice_dataandapi_keyas array offsets on the raw option value.inc/main.php—Optml_Main::instance()line 109 attachesadd_settings()tooptimole_wp_logger_data, matching the product callback named in the production stack trace.inc/settings.php—Optml_Settings::get_raw_settings()lines 785-787 in tagv4.2.10directly returnsget_option( $this->namespace, false )with no array validation.- Commit
8716dd792bffbbef1dbae21e5eaab8edd5535091introduced the logger callback on 2025-08-18. Tagv4.2.10points to060fd3fe424f5fd239304fd8dd7f6736fb90596dand retains the unvalidated raw-option return. Commit0165f5e76deecfc8fee6c7b5058c00baaa8f7bb0, dated 2026-08-04 and afterv4.2.10, contains a non-array guard on the same method.
Engineering notes
- The telemetry call chain reaches the product filter from the bundled SDK logger, but the fatal operation and the missing type boundary are in the Optimole repository rather than SDK code.
- The crash requires
optml_settingsto be persisted as a string or another non-array value. The telemetry does not disclose how that persisted value arose. - Current
mastercontains the guard from0165f5e7; the affected telemetry version is the earlier releasedv4.2.10tag.
Test coverage status
tests/test-logger.php covers logger instance creation and basic log storage/retrieval, but contains no coverage for the optimole_wp_logger_data filter or non-array raw settings. No relevant coverage was found during inspection for Optml_Main::add_settings() with malformed option data.
What to verify or explore next
- May be worth reproducing on the
v4.2.10tag by storing a string in theoptml_settingsoption and triggering the logger cron action. - May be worth confirming the first release that includes commit
0165f5e7and whether affected sites remain onv4.2.10. - If reproducible, checking the relevant PHP unit suite with malformed option values would establish release-level coverage.
Unknowns / follow-up
- The telemetry does not reveal the persisted option value or the workflow that wrote it.
- No customer-site inspection was performed.
Confidence
Confidence: 99/100
Production telemetry provides a direct fatal-error frame in Optimole 4.2.10, and the tagged source permits a string option value to reach array-offset unset() calls. A post-release commit on master adds the missing array validation, confirming the released behavior is a product defect.
Crash telemetry
| Occurrences | 2 |
| Distinct sites | 1 |
| First seen | 2026-08-05 18:04 UTC |
| Last seen | 2026-08-06 00:05 UTC |
| Crash location | product:inc/main.php:161 |
| Request context | cron |
| Inside Themeisle SDK | no |
| Product versions | 4.2.10 |
| WP versions | 7.0.2 |
| PHP versions | 8.2.33 |
| SDK versions | 3.3.58 |
Source: automated crash report — optimole-wp, fingerprint bde4b12fac2c18087bc7e75d92d846e3
Generated by bug-report-triage (ID: bug-report-triage_6a7422fe937474.06797849)
- Lenguaje dominante
- PHP
- Estrellas
- 74
- Forks
- 14
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 21
Preparar el entorno
- Incluye un Dockerfile o un 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/optimole-wp
-
Missing-srcset enhancement rewrites data-*-srcset attributes and breaks Envira lazy-load placeholdersPosiblemente ocupada @selul la tomó hoy. Abierto3rd-part-compatibilities bug-report
Codeinwp/optimole-wp#1184 · 1 comentario · 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 35/100
Codeinwp/optimole-wp#1179 ·
Los mantenedores suelen responder en 1 día
-
Add setting to disable Optimole URL rewriting for social meta tags (og:image / twitter:image)Abiertocustomer report feature-request-triage
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
Codeinwp/optimole-wp#1178 ·
Los mantenedores suelen responder en 1 día
-
bug-report bug-report-triage crash-report regression
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Codeinwp/optimole-wp#1163 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Optimized-image polling calls the SDK before initializationPosiblemente ocupada @selul la tomó hace 7 días. Abiertobug-report bug-report-triage crash-report
Dificultad 4/5 3-5 días Aptitud para principiantes 65/100
Codeinwp/optimole-wp#1162 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Codeinwp/optimole-wp
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Featured image not passed to checks in the Tasks column or publish blocksPosiblemente ocupada @roborourke la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
humanmade/publication-checklist#100 ·
Los mantenedores suelen responder en 1 día
-
bug customer-reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MagnaCapax/PMSS#1072 ·
Los mantenedores suelen responder en 5 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
hestiacp/hestiacp#5800 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 68/100
components-web-app/docs#244 ·