Repository navigation
Description
Summary
When a frontend page generates the logo variants, an array-valued logo palette setting can cause a TypeError in json_decode(). The expected behavior is for logo variants to be generated without aborting the page request; the reported request instead terminates with a fatal error, interrupting frontend rendering on affected sites.
Customer context
- Product / area: Neve theme, Header/Footer Builder logo component
- Version: 4.2.19
- Environment: WordPress 7.1.4; PHP 8.4.10 and 8.4.27
- Integration / third party: Not identified as relevant in the telemetry
- Reported error / symptom:
json_decode()received an array where a string was required during logo variant filtering - Impact: Frontend request terminates during script preparation on affected sites
Reproduction notes
Automated telemetry reports the failure on frontend requests in Neve 4.2.19. Manual reproduction steps and the affected stored setting value are not available; the trace confirms the argument type at the failing call.
Diagnosis
Conclusion
Neve 4.2.19 can produce the reported TypeError when the logo palette theme mod is an array. The telemetry confirms the array argument at json_decode(); source inspection confirms that the stored value can flow to that call without being normalized.
Where this likely occurs
- Frontend logo variant generation:
header-footer-grid/Core/Components/Logo.php—Logo::filter_logo_variants()lines 213–215 passes the result ofMods::get()directly tojson_decode(). - Theme-mod retrieval:
inc/core/settings/mods.php—Mods::get()lines 41–60 returns the cachedget_theme_mod()value directly when no subkey is requested. header-footer-grid/Core/Components/Logo.php—Logo::sanitize_logo_json()lines 310–329 encodes array input, but the call at line 215 uses it only to create the fallback argument toMods::get(); a stored setting returned byMods::get()bypasses that sanitizer.
Engineering notes
The affected path runs while generating the inline logo script during frontend asset preparation. The existing array-handling change, commit 23af5581d (included from v4.2.12 onward), handles array input to sanitize_logo_json() itself but does not normalize a stored value returned by Mods::get(). The crash is reported in v4.2.19. The telemetry does not identify how the array-valued setting was stored.
Test coverage status
tests/test-neve-sanitization.php contains TestSanitization::test_logo_json_sanitizer_accepts_array_input() (lines 201–211), which checks the sanitizer directly. No relevant coverage was found during inspection for an array-valued stored setting flowing through Logo::filter_logo_variants().
What to verify or explore next
- May be worth reproducing
Logo::filter_logo_variants()with an array-valued stored logo palette setting under the reported PHP versions. - The exact origin and shape of the stored array on the affected sites remain unverified.
Unknowns / follow-up
It is unknown whether the array-valued setting came from a customization workflow, migration, or another integration; the telemetry does not include that context.
Confidence
Confidence: 93/100
The production trace records an array passed to json_decode() at the exact Neve logo-variant call site, and tagged 4.2.19 source passes the theme-mod value there without normalizing a stored array.
Crash telemetry
| Occurrences | 8 |
| Distinct sites | 2 |
| First seen | 2026-11-09 04:24 UTC |
| Last seen | 2026-11-13 14:23 UTC |
| Crash location | product:header-footer-grid/Core/Components/Logo.php:215 |
| Request context | frontend |
| Inside Themeisle SDK | no |
| Product versions | 4.2.19 |
| WP versions | 7.1.4 |
| PHP versions | 8.4.10, 8.4.27 |
| SDK versions | 3.3.73 |
Source: automated crash report — neve, fingerprint 1e7bc55ea14f592d6e7f1bb302f528dd
Generated by bug-report-triage (ID: bug-report-triage_6af7f95fc97d83.52974889)
Activity
girishpanchal30 commentedon Nov 19, 2026
I have fixed it with PR #4705
milicavs commentedon Nov 19, 2026
🧪 QA steps and test links
When Neve's stored logo setting is saved as a list of values instead of as text, every front-end page of the site stops with "There has been a critical error on this website." Crash reports show it on live sites running 4.2.19. How the setting got stored that way is unknown, so the steps store it that way with a Code Snippet.
Requires: the Code Snippets plugin (for step 2).
Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array givenc18db2a(Appearance also shows 4.2.19)In the links:
debug.log.Reproduce on Neve 4.2.19:
json_decode()TypeError in debug.log.Edge cases
Fix: #4705 (open)
pirate-bot commentedon Nov 19, 2026
QA agent — 🟢 Passing checks · Array-stored logo palettes no longer crash the front end.
The reported crash reproduced on the base build, but the page and Customizer preview loaded with the fix. A replacement logo persisted, and light and dark logos switched correctly in both storage formats. A direct update to WordPress’s separate logo setting left Neve’s palette unchanged; the same happened with JSON on the base build. A partial palette also produced a warning during that direct update.
Worth a human look
Checks (5 passed)
Full report, evidence and session trail